diff options
Diffstat (limited to 'src/soc/intel/apollolake/i2c_early.c')
-rw-r--r-- | src/soc/intel/apollolake/i2c_early.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/soc/intel/apollolake/i2c_early.c b/src/soc/intel/apollolake/i2c_early.c index bb002748f0..4eb2b86042 100644 --- a/src/soc/intel/apollolake/i2c_early.c +++ b/src/soc/intel/apollolake/i2c_early.c @@ -19,6 +19,7 @@ #include <device/device.h> #include <device/i2c.h> #include <device/pci_def.h> +#include <intelblocks/lpss.h> #include <soc/intel/common/lpss_i2c.h> #include <soc/i2c.h> #include <soc/iomap.h> @@ -32,8 +33,6 @@ static int i2c_early_init_bus(unsigned int bus) pci_devfn_t dev; int devfn; uintptr_t base; - uint32_t value; - void *reg; /* Find the PCI device for this bus controller */ devfn = i2c_bus_to_devfn(bus); @@ -64,10 +63,7 @@ static int i2c_early_init_bus(unsigned int bus) PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); /* Take device out of reset */ - reg = (void *)(base + I2C_LPSS_REG_RESET); - value = read32(reg); - value |= I2C_LPSS_RESET_RELEASE_HC; - write32(reg, value); + lpss_reset_release(base); /* Initialize the controller */ if (lpss_i2c_init(bus, &config->i2c[bus]) < 0) { |