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?
Thanks to Segher for rediscovering this bug.
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); -}
On Mon, Aug 25, 2008 at 7:54 PM, Carl-Daniel Hailfinger
Options:
- Kill it in the southbridge code and use mainboard code only.
maybe.
- Make the southbridge one a weak symbol.
I hate weak symbols :-)
- Rename the southbridge one and call it from mainboard code.
This is very sensible to me.
ron
On Mon, Aug 25, 2008 at 08:03:04PM -0700, ron minnich wrote:
On Mon, Aug 25, 2008 at 7:54 PM, Carl-Daniel Hailfinger
Options:
- Kill it in the southbridge code and use mainboard code only.
maybe.
- Make the southbridge one a weak symbol.
I hate weak symbols :-)
- Rename the southbridge one and call it from mainboard code.
This is very sensible to me.
Ack (if the code is not board-specific; I assume that it's probably not, or boards can override the generic code if needed).
Uwe.
On 26.08.2008 20:06, Uwe Hermann wrote:
On Mon, Aug 25, 2008 at 08:03:04PM -0700, ron minnich wrote:
On Mon, Aug 25, 2008 at 7:54 PM, Carl-Daniel Hailfinger
Options:
- Kill it in the southbridge code and use mainboard code only.
maybe.
- Rename the southbridge one and call it from mainboard code
This is very sensible to me.
Ack (if the code is not board-specific; I assume that it's probably not, or boards can override the generic code if needed).
How to read the SPD ROMs is entirely mainboard-specific. For Geode, there are two functions: - one reads SPD via SMBus - the other one reads fake SPD from an array.
Selecting the right function is the challenge here. Ron once complained that v2 was "too greppy". Adding another layer of indirection (southbridge function renaming) would cause exactly that greppiness. And the function we're talking about is a one-liner. I think we can live with duplicating it between mainboard dirs. Desktop boards with multiplexes SMBus will have the same problem.
Ron, unless you have strong objections, I'll commit the original patch with southbridge function removal.
Regards, Carl-Daniel
On Tue, Aug 26, 2008 at 6:22 PM, Carl-Daniel Hailfinger
Ron, unless you have strong objections, I'll commit the original patch with southbridge function removal.
go for it.
Acked-by: Ronald G. Minnich rminnich@gmail.com
On 27.08.2008 07:02, ron minnich wrote:
On Tue, Aug 26, 2008 at 6:22 PM, Carl-Daniel Hailfinger
Ron, unless you have strong objections, I'll commit the original patch with southbridge function removal.
go for it.
Acked-by: Ronald G. Minnich rminnich@gmail.com
Thanks, r830.
Regards, Carl-Daniel