diff options
author | Aamir Bohra <aamir.bohra@intel.com> | 2017-04-06 20:21:58 +0530 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-04-11 17:00:43 +0200 |
commit | 138b2a03bedb059f7a4064b4ff03d88083774302 (patch) | |
tree | 3adb0bd38c9ad0f7b7693f000eae4d8609de834c /src/soc/intel/apollolake/i2c_early.c | |
parent | 015c64335d13b9e213fa93127d621c574b17018e (diff) |
soc/intel/apollolake: Use LPSS common library
Use lpss common library to program reset and
clock register for lpss modules
Change-Id: I75f9aebd60290fbf22684f8cc2ce8e8a4a4304b0
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/19154
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
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) { |