[U-Boot] [RFC v0 11/11] omap3: Consolidate I2C information into omap3_common.h
Tom Rini
trini at ti.com
Thu Mar 22 20:09:17 CET 2012
We default to standard speed for i2c and allow boards to override with
fast or full-speed. This also removes a number of unused defines.
Signed-off-by: Tom Rini <trini at ti.com>
---
include/configs/am3517_crane.h | 6 +-----
include/configs/am3517_evm.h | 6 +-----
include/configs/cm_t35.h | 6 +-----
include/configs/devkit8000.h | 7 +------
include/configs/dig297.h | 6 +-----
include/configs/igep00x0.h | 6 +-----
include/configs/mcx.h | 5 +----
include/configs/omap3_beagle.h | 7 +------
include/configs/omap3_common.h | 11 +++++++++++
include/configs/omap3_evm_common.h | 10 +---------
include/configs/omap3_logic.h | 12 +-----------
include/configs/omap3_mvblx.h | 7 +------
include/configs/omap3_overo.h | 5 +----
include/configs/omap3_pandora.h | 6 +-----
include/configs/omap3_sdp3430.h | 10 +---------
include/configs/omap3_zoom1.h | 7 +------
include/configs/omap3_zoom2.h | 7 +------
include/configs/tam3517-common.h | 6 +-----
include/configs/tricorder.h | 7 +------
19 files changed, 29 insertions(+), 108 deletions(-)
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 6b681e5..48579ce 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -112,12 +112,8 @@
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 6137730..bd58bad 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -112,12 +112,8 @@
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 14c443c..c2c5af6 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -103,12 +103,8 @@
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 91d976f..bc51e53 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -73,13 +73,8 @@
#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
#define CONFIG_BAUDRATE 115200
-/* I2C */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/* TWL4030 */
#define CONFIG_TWL4030_POWER 1
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index 792dff7..7708d2c 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -95,12 +95,8 @@
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/*
* TWL4030
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index d7136ef..d6eff96 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -80,12 +80,8 @@
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/*
* TWL4030
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 9d3b443..12e7280 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -105,11 +105,8 @@
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_DRIVER_OMAP34XX_I2C
/* RTC */
#define CONFIG_RTC_DS1337
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index ec1856d..05b051a 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -129,13 +129,8 @@
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_I2C_MULTI_BUS 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
#define CONFIG_VIDEO_OMAP3 /* DSS Support */
/*
diff --git a/include/configs/omap3_common.h b/include/configs/omap3_common.h
index 6fc93b8..0ae1614 100644
--- a/include/configs/omap3_common.h
+++ b/include/configs/omap3_common.h
@@ -89,6 +89,17 @@
115200}
#endif
+/*
+ * I2C support. We default to standard speed but allow boards to specify
+ * fast or high-speed.
+ * */
+#define CONFIG_CMD_I2C
+#define CONFIG_HARD_I2C
+#ifndef CONFIG_SYS_I2C_SPEED
+#define CONFIG_SYS_I2C_SPEED 100000
+#endif
+#define CONFIG_DRIVER_OMAP34XX_I2C
+
/* MMC */
#define CONFIG_CMD_MMC
#if defined(CONFIG_CMD_MMC)
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index c96a881..7a47bc4 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -77,16 +77,8 @@
#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
#define CONFIG_BAUDRATE 115200
-/*
- * I2C
- */
-#define CONFIG_HARD_I2C
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
/*
* PISMO support
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index e9415a7..d50c6f1 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -86,18 +86,8 @@
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-
-/*
- * I2C
- */
-#define CONFIG_HARD_I2C
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_I2C_MULTI_BUS
/*
* TWL4030
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 6199eca..c29c99d 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -102,13 +102,8 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_FPGA
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 0 */
#define CONFIG_SYS_I2C_SLAVE 0
-#define CONFIG_SYS_I2C_BUS 0 /* This isn't used anywhere ?? */
-#define CONFIG_SYS_I2C_BUS_SELECT 1 /* This isn't used anywhere ?? */
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
-#define CONFIG_I2C_MULTI_BUS 1
/*
* TWL4030
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 71bb1a3..c2a4cbe 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -64,11 +64,8 @@
#undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_DRIVER_OMAP34XX_I2C
/*
* TWL4030
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 7b22c83..84292e4 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -79,12 +79,8 @@
#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/*
* TWL4030
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index b082f30..6d73887 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -89,16 +89,8 @@
#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
#endif
-
-/*
- * I2C for power management setup
- */
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/* OMITTED: single 1 Gbit MT29F1G NAND flash */
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 13ef802..93fbd39 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -89,13 +89,8 @@
#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
-#define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/*
* TWL4030
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index 806854b..fe71a16 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -121,13 +121,8 @@
#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
-#define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C 1
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/*
* TWL4030
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 392b660..f5d2f5e 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -89,13 +89,9 @@
#undef CONFIG_CMD_FLASH /* only NAND on the SOM */
#undef CONFIG_CMD_IMLS
-#define CONFIG_HARD_I2C
+/* Use fast mode i2c and our i2c slave is 1 */
#define CONFIG_SYS_I2C_SPEED 400000
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
#define CONFIG_AUTO_COMPLETE
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 41e1aae..b3cd6a0 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -66,13 +66,8 @@
#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
#define CONFIG_BAUDRATE 115200
-/* I2C */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000
+/* Our i2c slave is 1 */
#define CONFIG_SYS_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_BUS 0
-#define CONFIG_SYS_I2C_BUS_SELECT 1
-#define CONFIG_DRIVER_OMAP34XX_I2C 1
/* TWL4030 */
#define CONFIG_TWL4030_POWER
--
1.7.0.4
More information about the U-Boot
mailing list