include/device: Split i2c.h into three
Split `i2c.h` into three pieces to ease reuse of the generic defi-
nitions. No code is changed.
* `i2c.h` - keeps the generic definitions
* `i2c_simple.h` - holds the current, limited to one controller driver
per board, devicetree independent I2C interface
* `i2c_bus.h` - will become the devicetree compatible interface for
native I2C (e.g. non-SMBus) controllers
Change-Id: I382d45c70f9314588663e1284f264f877469c74d
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20845
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/soc/broadcom/cygnus/i2c.c b/src/soc/broadcom/cygnus/i2c.c
index bc43a88..ac431e7 100644
--- a/src/soc/broadcom/cygnus/i2c.c
+++ b/src/soc/broadcom/cygnus/i2c.c
@@ -17,7 +17,7 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/i2c.h>
struct cygnus_i2c_regs {
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 7b36089..33e2dad 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -22,7 +22,7 @@
#include <soc/gpio.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/lpss_i2c.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/pm.h>
#include <soc/usb.h>
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index f4b1e8c..aeb6d8f 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -14,7 +14,7 @@
*/
#include <arch/acpigen.h>
-#include <device/i2c.h>
+#include <device/i2c_bus.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
diff --git a/src/soc/intel/common/block/i2c/i2c_early.c b/src/soc/intel/common/block/i2c/i2c_early.c
index 7c9ce60..74fc994 100644
--- a/src/soc/intel/common/block/i2c/i2c_early.c
+++ b/src/soc/intel/common/block/i2c/i2c_early.c
@@ -17,7 +17,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <intelblocks/lpss.h>
diff --git a/src/soc/intel/common/block/i2c/lpss_i2c.c b/src/soc/intel/common/block/i2c/lpss_i2c.c
index 711517f..868a6ad 100644
--- a/src/soc/intel/common/block/i2c/lpss_i2c.c
+++ b/src/soc/intel/common/block/i2c/lpss_i2c.c
@@ -18,7 +18,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
diff --git a/src/soc/intel/common/block/include/intelblocks/lpss_i2c.h b/src/soc/intel/common/block/include/intelblocks/lpss_i2c.h
index 2f60d65..033081f 100644
--- a/src/soc/intel/common/block/include/intelblocks/lpss_i2c.h
+++ b/src/soc/intel/common/block/include/intelblocks/lpss_i2c.h
@@ -16,6 +16,7 @@
#ifndef SOC_INTEL_COMMON_BLOCK_LPSS_I2C_H
#define SOC_INTEL_COMMON_BLOCK_LPSS_I2C_H
+#include <device/device.h>
#include <device/i2c.h>
#include <stdint.h>
diff --git a/src/soc/intel/quark/gpio_i2c.c b/src/soc/intel/quark/gpio_i2c.c
index 5580894..d5543b8 100644
--- a/src/soc/intel/quark/gpio_i2c.c
+++ b/src/soc/intel/quark/gpio_i2c.c
@@ -16,7 +16,7 @@
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <soc/i2c.h>
diff --git a/src/soc/intel/quark/i2c.c b/src/soc/intel/quark/i2c.c
index e8dba53..2a194af 100644
--- a/src/soc/intel/quark/i2c.c
+++ b/src/soc/intel/quark/i2c.c
@@ -17,7 +17,7 @@
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <soc/i2c.h>
diff --git a/src/soc/intel/skylake/chip.h b/src/soc/intel/skylake/chip.h
index efd3566..ea985db 100644
--- a/src/soc/intel/skylake/chip.h
+++ b/src/soc/intel/skylake/chip.h
@@ -20,7 +20,7 @@
#define _SOC_CHIP_H_
#include <arch/acpi_device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <intelblocks/gspi.h>
#include <intelblocks/lpss_i2c.h>
#include <stdint.h>
diff --git a/src/soc/mediatek/mt8173/da9212.c b/src/soc/mediatek/mt8173/da9212.c
index 8161667..cc20979 100644
--- a/src/soc/mediatek/mt8173/da9212.c
+++ b/src/soc/mediatek/mt8173/da9212.c
@@ -14,7 +14,7 @@
*/
#include <console/console.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/da9212.h>
enum {
diff --git a/src/soc/mediatek/mt8173/i2c.c b/src/soc/mediatek/mt8173/i2c.c
index 1d541e5..9ca6803 100644
--- a/src/soc/mediatek/mt8173/i2c.c
+++ b/src/soc/mediatek/mt8173/i2c.c
@@ -15,7 +15,7 @@
#include <assert.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <string.h>
#include <symbols.h>
#include <timer.h>
diff --git a/src/soc/mediatek/mt8173/mt6311.c b/src/soc/mediatek/mt8173/mt6311.c
index 8390dfd..8f0b274 100644
--- a/src/soc/mediatek/mt8173/mt6311.c
+++ b/src/soc/mediatek/mt8173/mt6311.c
@@ -14,7 +14,7 @@
*/
#include <console/console.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/mt6311.h>
enum {
diff --git a/src/soc/nvidia/tegra/i2c.c b/src/soc/nvidia/tegra/i2c.c
index e371a9d..7d3e0bf 100644
--- a/src/soc/nvidia/tegra/i2c.c
+++ b/src/soc/nvidia/tegra/i2c.c
@@ -16,7 +16,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <stdlib.h>
#include <string.h>
#include <soc/addressmap.h>
diff --git a/src/soc/nvidia/tegra/software_i2c.c b/src/soc/nvidia/tegra/software_i2c.c
index fe2f61e..50aac8c 100644
--- a/src/soc/nvidia/tegra/software_i2c.c
+++ b/src/soc/nvidia/tegra/software_i2c.c
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*/
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <gpio.h>
#include <soc/pinmux.h>
diff --git a/src/soc/nvidia/tegra124/dp.c b/src/soc/nvidia/tegra124/dp.c
index 0132369..d646e8e 100644
--- a/src/soc/nvidia/tegra124/dp.c
+++ b/src/soc/nvidia/tegra124/dp.c
@@ -19,7 +19,7 @@
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <edid.h>
#include <soc/addressmap.h>
#include <soc/nvidia/tegra/i2c.h>
diff --git a/src/soc/nvidia/tegra210/dp.c b/src/soc/nvidia/tegra210/dp.c
index 350eb82..119b4a7 100644
--- a/src/soc/nvidia/tegra210/dp.c
+++ b/src/soc/nvidia/tegra210/dp.c
@@ -17,7 +17,7 @@
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <edid.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/soc/qualcomm/ipq40xx/i2c.c b/src/soc/qualcomm/ipq40xx/i2c.c
index 0cffaac..133f564 100644
--- a/src/soc/qualcomm/ipq40xx/i2c.c
+++ b/src/soc/qualcomm/ipq40xx/i2c.c
@@ -33,7 +33,7 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <stdlib.h>
#include <string.h>
#include <soc/blsp.h>
diff --git a/src/soc/qualcomm/ipq806x/i2c.c b/src/soc/qualcomm/ipq806x/i2c.c
index 009cb94..9660ec8 100644
--- a/src/soc/qualcomm/ipq806x/i2c.c
+++ b/src/soc/qualcomm/ipq806x/i2c.c
@@ -31,7 +31,7 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <stdlib.h>
#include <string.h>
#include <soc/gsbi.h>
diff --git a/src/soc/rockchip/common/i2c.c b/src/soc/rockchip/common/i2c.c
index 5847f16..09b5624 100644
--- a/src/soc/rockchip/common/i2c.c
+++ b/src/soc/rockchip/common/i2c.c
@@ -18,7 +18,7 @@
#include <cbfs.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/addressmap.h>
#include <soc/grf.h>
#include <soc/soc.h>
diff --git a/src/soc/rockchip/common/rk808.c b/src/soc/rockchip/common/rk808.c
index a68b838..9b4708c 100644
--- a/src/soc/rockchip/common/rk808.c
+++ b/src/soc/rockchip/common/rk808.c
@@ -17,7 +17,7 @@
#include <bcd.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <rtc.h>
#include <soc/rk808.h>
#include <stdint.h>
diff --git a/src/soc/rockchip/rk3288/software_i2c.c b/src/soc/rockchip/rk3288/software_i2c.c
index 886e2d1..dbe058e 100644
--- a/src/soc/rockchip/rk3288/software_i2c.c
+++ b/src/soc/rockchip/rk3288/software_i2c.c
@@ -15,7 +15,7 @@
#include <arch/io.h>
#include <console/console.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <gpio.h>
#include <soc/grf.h>
#include <soc/i2c.h>
diff --git a/src/soc/samsung/exynos5250/i2c.c b/src/soc/samsung/exynos5250/i2c.c
index 6319a10..19ef6678 100644
--- a/src/soc/samsung/exynos5250/i2c.c
+++ b/src/soc/samsung/exynos5250/i2c.c
@@ -19,7 +19,7 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/clk.h>
#include <soc/i2c.h>
#include <soc/periph.h>
diff --git a/src/soc/samsung/exynos5420/i2c.c b/src/soc/samsung/exynos5420/i2c.c
index ae9560f..dd5ffd2 100644
--- a/src/soc/samsung/exynos5420/i2c.c
+++ b/src/soc/samsung/exynos5420/i2c.c
@@ -19,7 +19,7 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <device/i2c.h>
+#include <device/i2c_simple.h>
#include <soc/clk.h>
#include <soc/i2c.h>
#include <soc/periph.h>