From af53a47b70fccb91914f868eb65686ffef6eefca Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 18 Jun 2007 23:59:51 +0000 Subject: [PATCH] add spd_read_byte function. It is a pass-through for smbus_read_byte. Signed-off-by: Ronald G. Minnich Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@359 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- southbridge/amd/cs5536/smbus_initram.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/southbridge/amd/cs5536/smbus_initram.c b/southbridge/amd/cs5536/smbus_initram.c index 1dcc134b3c..c07a2e208c 100644 --- a/southbridge/amd/cs5536/smbus_initram.c +++ b/southbridge/amd/cs5536/smbus_initram.c @@ -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); +}