[coreboot] [RFC][PATCH] v3: kill duplicated function
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Tue Aug 26 04:54:17 CEST 2008
Every GeodeLX target already has spd_read_byte in
mainboard/$VENDOR/$BOARD/initram.c. It's pointless to have it in the
southbridge code as well.
Options:
- Kill it in the southbridge code and use mainboard code only.
- Make the southbridge one a weak symbol.
- Rename the southbridge one and call it from mainboard code.
Comments?
Regards,
Carl-Daniel
Index: southbridge/amd/cs5536/smbus_initram.c
===================================================================
--- southbridge/amd/cs5536/smbus_initram.c (Revision 821)
+++ southbridge/amd/cs5536/smbus_initram.c (Arbeitskopie)
@@ -330,20 +330,3 @@
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's 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).
- */
-u8 spd_read_byte(u16 device, u8 address)
-{
- return smbus_read_byte(device, address);
-}
--
http://www.hailfinger.org/
More information about the coreboot
mailing list