Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38121 )
Change subject: [WIP] lib/spd_bim,soc/intel/common: Move get_spd_smbus() ......................................................................
Patch Set 2:
Patch Set 2:
So in the end, if one wanted to write a common (lib/) get_spd(), what interface should be used? or how should it look like compared to early_smbus?
I am trying to figure it out and consider the possibility of i2c multiplexers as I do it. I believe we agreed that host controller (IO/MMIO) base address and slave device (I2C) address that we currently pass is not sufficient with tree-like topology that smbus/i2c might appear in.
In my vision, the low level functions do_smbus_read|write() would keep their current parameters. The API for slave device would oass 'const struct device *' and derive the required host base and multiplex configuration from the topology.