[LinuxBIOS] r359 - LinuxBIOSv3/southbridge/amd/cs5536

svn at openbios.org svn at openbios.org
Tue Jun 19 01:59:51 CEST 2007


Author: rminnich
Date: 2007-06-19 01:59:51 +0200 (Tue, 19 Jun 2007)
New Revision: 359

Modified:
   LinuxBIOSv3/southbridge/amd/cs5536/smbus_initram.c
Log:

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

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


Modified: LinuxBIOSv3/southbridge/amd/cs5536/smbus_initram.c
===================================================================
--- LinuxBIOSv3/southbridge/amd/cs5536/smbus_initram.c	2007-06-16 17:11:59 UTC (rev 358)
+++ LinuxBIOSv3/southbridge/amd/cs5536/smbus_initram.c	2007-06-18 23:59:51 UTC (rev 359)
@@ -329,3 +329,20 @@
 
 	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);
+}





More information about the coreboot mailing list