summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
authorChris Ching <chingcodes@chromium.org>2017-12-06 14:26:15 -0700
committerChris Ching <chingcodes@chromium.org>2017-12-22 16:39:42 +0000
commitb8dc63bdfe04fc15553f1ea6e42583cbdaad38ac (patch)
tree6c25cdb3bb62df3cb80b01f111467b98800d18d0 /src/soc/intel/apollolake
parent17e85adc91d905919f8c4a512125ebd457ce99db (diff)
downloadcoreboot-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/apollolake')
-rw-r--r--src/soc/intel/apollolake/Kconfig4
-rw-r--r--src/soc/intel/apollolake/chip.h4
-rw-r--r--src/soc/intel/apollolake/i2c.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 89b5835f3c..2d5363d6b9 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -157,6 +157,10 @@ config SOC_INTEL_COMMON_LPSS_CLOCK_MHZ
int
default 133
+config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
+ int
+ default SOC_INTEL_COMMON_LPSS_CLOCK_MHZ
+
config CONSOLE_UART_BASE_ADDRESS
depends on CONSOLE_SERIAL
hex
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 78410fdbe5..8573cf44b5 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -23,8 +23,8 @@
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <intelblocks/lpc_lib.h>
-#include <intelblocks/lpss_i2c.h>
#include <device/i2c_simple.h>
+#include <drivers/i2c/designware/dw_i2c.h>
#include <soc/pm.h>
#include <soc/usb.h>
@@ -93,7 +93,7 @@ struct soc_intel_apollolake_config {
enum serirq_mode serirq_mode;
/* I2C bus configuration */
- struct lpss_i2c_bus_config i2c[APOLLOLAKE_I2C_DEV_MAX];
+ struct dw_i2c_bus_config i2c[APOLLOLAKE_I2C_DEV_MAX];
uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
diff --git a/src/soc/intel/apollolake/i2c.c b/src/soc/intel/apollolake/i2c.c
index 4ae500ecce..5925f3d22c 100644
--- a/src/soc/intel/apollolake/i2c.c
+++ b/src/soc/intel/apollolake/i2c.c
@@ -16,12 +16,12 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pci_def.h>
-#include <intelblocks/lpss_i2c.h>
+#include <drivers/i2c/designware/dw_i2c.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include "chip.h"
-const struct lpss_i2c_bus_config *i2c_get_soc_cfg(unsigned int bus,
+const struct dw_i2c_bus_config *i2c_get_soc_cfg(unsigned int bus,
const struct device *dev)
{
const struct soc_intel_apollolake_config *config;