mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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:
parent
5f3437c98a
commit
af53a47b70
1 changed files with 17 additions and 0 deletions
|
@ -329,3 +329,20 @@ int smbus_read_byte(u16 device, u8 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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue