summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index fe220b58fb..6debe88eeb 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -41,7 +41,7 @@ uintptr_t lpss_i2c_base_address(unsigned int bus)
/* devfn -> dev */
dev = dev_find_slot(0, devfn);
- if (!dev)
+ if (!dev || !dev->enabled)
return (uintptr_t)NULL;
/* dev -> bar0 */
@@ -119,7 +119,12 @@ static void lpss_i2c_acpi_fill_ssdt(struct device *dev)
I2C_SPEED_FAST_PLUS,
I2C_SPEED_HIGH,
};
- int i, bus = lpss_i2c_dev_to_bus(dev);
+ int i, bus;
+
+ if (!dev->enabled)
+ return;
+
+ bus = lpss_i2c_dev_to_bus(dev);
bcfg = i2c_get_soc_cfg(bus, dev);