Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68149 )
Change subject: TESTONLY: Remove non ramstage i2c ......................................................................
TESTONLY: Remove non ramstage i2c
Who breaks??
Change-Id: Ib5cc50020904c81ee4927dd33bf168ad8808a202 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/common/block/i2c/Makefile.inc M src/soc/intel/common/block/i2c/i2c.c 2 files changed, 14 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/68149/1
diff --git a/src/soc/intel/common/block/i2c/Makefile.inc b/src/soc/intel/common/block/i2c/Makefile.inc index db26538..14a6dee 100644 --- a/src/soc/intel/common/block/i2c/Makefile.inc +++ b/src/soc/intel/common/block/i2c/Makefile.inc @@ -1,9 +1,5 @@ ifeq ($(CONFIG_SOC_INTEL_COMMON_BLOCK_I2C),y)
-bootblock-y += i2c.c -romstage-y += i2c.c -verstage-y += i2c.c -postcar-y += i2c.c ramstage-y += i2c.c
endif diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c index 481ba7b..3db1435 100644 --- a/src/soc/intel/common/block/i2c/i2c.c +++ b/src/soc/intel/common/block/i2c/i2c.c @@ -141,13 +141,8 @@ */ static void dw_i2c_device_init(struct device *dev) { - uintptr_t base_address; - int bus = dw_i2c_soc_dev_to_bus(dev); - - if (bus < 0) - return; - - base_address = dw_i2c_base_address(bus); + struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); + uintptr_t base_address = res->base; if (!base_address) return;