summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index 7fdf8187ff..acfb053d6a 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -127,7 +127,12 @@ uintptr_t dw_i2c_base_address(unsigned int bus)
if (res)
return res->base;
- return (uintptr_t)NULL;
+ /* No resource found yet, it's possible this is running in the
+ * PAYLOAD_LOADER stage before resources have been assigned yet,
+ * therefore, any early init BAR should still be valid. */
+
+ /* Read the first base address for this device */
+ return (uintptr_t)ALIGN_DOWN(pci_read_config32(dev, PCI_BASE_ADDRESS_0), 16);
}
/*