summaryrefslogtreecommitdiff
path: root/include/configs/GEN860T.h
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2013-01-29 08:53:15 +0100
committerHeiko Schocher <hs@denx.de>2013-07-23 05:54:29 +0200
commitea818dbbcd59300b56014ac2d67798a54994eb9b (patch)
treefbdedc80f785873f96e79893a1a813504af57580 /include/configs/GEN860T.h
parent3f4978c713255c8406875fbdf23ffed1129bc44b (diff)
downloadu-boot-imx-ea818dbbcd59300b56014ac2d67798a54994eb9b.zip
u-boot-imx-ea818dbbcd59300b56014ac2d67798a54994eb9b.tar.gz
u-boot-imx-ea818dbbcd59300b56014ac2d67798a54994eb9b.tar.bz2
i2c, soft-i2c: switch to new multibus/multiadapter support
- added to soft_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'include/configs/GEN860T.h')
-rw-r--r--include/configs/GEN860T.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/include/configs/GEN860T.h b/include/configs/GEN860T.h
index 9a649ca..cc03d39 100644
--- a/include/configs/GEN860T.h
+++ b/include/configs/GEN860T.h
@@ -158,26 +158,33 @@
/*
* Enable I2C and select the hardware/software driver
*/
-#define CONFIG_HARD_I2C 1 /* CPM based I2C */
-#undef CONFIG_SOFT_I2C /* Bit-banged I2C */
+#define CONFIG_HARD_I2C 1 /* CPM based I2C */
+#undef CONFIG_SYS_I2C_SOFT /* Bit-banged I2C */
#ifdef CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */
-#define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */
+#define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */
+#define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */
#endif
-#ifdef CONFIG_SOFT_I2C
-#define PB_SCL 0x00000020 /* PB 26 */
-#define PB_SDA 0x00000010 /* PB 27 */
-#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
-#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
-#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
-#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
-#define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
- else immr->im_cpm.cp_pbdat &= ~PB_SDA
-#define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
- else immr->im_cpm.cp_pbdat &= ~PB_SCL
-#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
+#ifdef CONFIG_SYS_I2C_SOFT
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_SOFT_SPEED 50000
+#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE
+#define PB_SCL 0x00000020 /* PB 26 */
+#define PB_SDA 0x00000010 /* PB 27 */
+#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
+#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
+#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
+#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
+#define I2C_SDA(bit) if (bit) \
+ immr->im_cpm.cp_pbdat |= PB_SDA; \
+ else \
+ immr->im_cpm.cp_pbdat &= ~PB_SDA
+#define I2C_SCL(bit) if (bit) \
+ immr->im_cpm.cp_pbdat |= PB_SCL; \
+ else \
+ immr->im_cpm.cp_pbdat &= ~PB_SCL
+#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
#endif
/*