Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38222 )
Change subject: soc/amd/stoneyridge: move to using smbus_host.h definitions ......................................................................
Patch Set 8: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/38222/8/src/soc/amd/stoneyridge/smb... File src/soc/amd/stoneyridge/smbus.c:
https://review.coreboot.org/c/coreboot/+/38222/8/src/soc/amd/stoneyridge/smb... PS8, Line 92: int do_smbus_recv_byte(uintptr_t mmio, u8 device) The way recv_byte() and send_byte() are being used to read SPD eeprom is about twice as fast as using sequence of read_byte(). However, it is always a type of split SMBus transaction that is comparable to index/data addressing like was used with IO 0xcf8/0xcf9. There are SMBus block commands that perform better and might be easier to maintain if we encounter platforms where we have some needs for SMP mutex and/or SMBus multiplexers are present.
With some schedule I feel raminit should not directly call SMBus methods, there is already code present where board variants need to switch between SMBus and CBFS for SPD data.
The block commands already present in southbridge/intel/common might be very much compatible with the SMBus host controller inside AMD silicons. Needs some investigation.