summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/apollolake/i2c.c')
-rw-r--r--src/soc/intel/apollolake/i2c.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/soc/intel/apollolake/i2c.c b/src/soc/intel/apollolake/i2c.c
index 3df333c869..bb14df2a0e 100644
--- a/src/soc/intel/apollolake/i2c.c
+++ b/src/soc/intel/apollolake/i2c.c
@@ -17,24 +17,17 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <drivers/i2c/designware/dw_i2c.h>
+#include <intelblocks/chip.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include "chip.h"
const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus)
{
- const struct soc_intel_apollolake_config *config;
- const struct device *dev = dev_find_slot(0, SA_DEVFN_ROOT);
+ const struct soc_intel_common_config *common_config;
+ common_config = chip_get_common_soc_structure();
- if (!dev || !dev->chip_info) {
- printk(BIOS_ERR, "%s: Could not find SoC devicetree config!\n",
- __func__);
- return NULL;
- }
-
- config = dev->chip_info;
-
- return &config->i2c[bus];
+ return &common_config->i2c[bus];
}
uintptr_t dw_i2c_get_soc_early_base(unsigned int bus)