diff options
author | Chris Ching <chingcodes@chromium.org> | 2017-12-06 14:26:15 -0700 |
---|---|---|
committer | Chris Ching <chingcodes@chromium.org> | 2017-12-22 16:39:42 +0000 |
commit | b8dc63bdfe04fc15553f1ea6e42583cbdaad38ac (patch) | |
tree | 6c25cdb3bb62df3cb80b01f111467b98800d18d0 /src/soc/intel/common/block/i2c/i2c_early.c | |
parent | 17e85adc91d905919f8c4a512125ebd457ce99db (diff) | |
download | coreboot-b8dc63bdfe04fc15553f1ea6e42583cbdaad38ac.tar.xz |
ic2/designware: Move Intel i2c logic to shared driver
BUG=b:70232394
BRANCH=none
TEST=emerge-reef coreboot
emerge-glados
Change-Id: Idb453a4d2411163e6b4a8422310bf272eac5d379
Signed-off-by: Chris Ching <chingcodes@chromium.org>
Reviewed-on: https://review.coreboot.org/22822
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/block/i2c/i2c_early.c')
-rw-r--r-- | src/soc/intel/common/block/i2c/i2c_early.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c_early.c b/src/soc/intel/common/block/i2c/i2c_early.c index 74fc994ca3..f10147ed95 100644 --- a/src/soc/intel/common/block/i2c/i2c_early.c +++ b/src/soc/intel/common/block/i2c/i2c_early.c @@ -20,13 +20,12 @@ #include <device/i2c_simple.h> #include <device/pci.h> #include <device/pci_def.h> +#include <drivers/i2c/designware/dw_i2c.h> #include <intelblocks/lpss.h> -#include <intelblocks/lpss_i2c.h> -#include "lpss_i2c.h" static int lpss_i2c_early_init_bus(unsigned int bus) { - const struct lpss_i2c_bus_config *config; + const struct dw_i2c_bus_config *config; const struct device *tree_dev; pci_devfn_t dev; int devfn; @@ -64,7 +63,7 @@ static int lpss_i2c_early_init_bus(unsigned int bus) lpss_reset_release(base); /* Initialize the controller */ - if (lpss_i2c_init(bus, config) < 0) { + if (dw_i2c_init(bus, config) < 0) { printk(BIOS_ERR, "I2C%u failed to initialize\n", bus); return -1; } @@ -72,7 +71,7 @@ static int lpss_i2c_early_init_bus(unsigned int bus) return 0; } -uintptr_t lpss_i2c_base_address(unsigned int bus) +uintptr_t dw_i2c_base_address(unsigned int bus) { int devfn; pci_devfn_t dev; |