add spd_read_byte function. It is a pass-through for smbus_read_byte.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@359 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Ronald G. Minnich 2007-06-18 23:59:51 +00:00
parent 5f3437c98a
commit af53a47b70

View file

@ -329,3 +329,20 @@ int smbus_read_byte(u16 device, u8 address)
return do_smbus_read_byte(SMBUS_IO_BASE, device, address); return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
} }
/**
* Read a byte from the SPD.
*
* For this chip, that is really just saying 'read a byte from smbus'.
* So we use smbus_read_byte. Nota Bene: leave this here as a function
* rather than a #define in an obscure location. This function is called
* only a few dozen times, and it not performance critical.
*
* @param device The device.
* @param address The address.
* @return The data from the SMBus packet area or an error of 0xff (i.e. -1).
*/
int spd_read_byte(u16 device, u8 address)
{
return smbus_read_byte(device, address);
}