summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2012-01-16 21:12:24 +0000
committerHeiko Schocher <hs@denx.de>2013-07-23 05:54:28 +0200
commit3f4978c713255c8406875fbdf23ffed1129bc44b (patch)
treec27f00ba6219d75f772167b7630bb4ebb383a271 /arch/arm/lib
parent385c9ef5a7215b2b0c22836fee6c692dfc8559d7 (diff)
downloadu-boot-imx-3f4978c713255c8406875fbdf23ffed1129bc44b.zip
u-boot-imx-3f4978c713255c8406875fbdf23ffed1129bc44b.tar.gz
u-boot-imx-3f4978c713255c8406875fbdf23ffed1129bc44b.tar.bz2
i2c: common changes for multibus/multiadapter support
Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Cc: Henrik Nordström <henrik@henriknordstrom.net>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/board.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 09ab4ad..5302a13 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -69,7 +69,8 @@ extern void dataflash_print_info(void);
#endif
#if defined(CONFIG_HARD_I2C) || \
- defined(CONFIG_SOFT_I2C)
+ defined(CONFIG_SOFT_I2C) || \
+ defined(CONFIG_SYS_I2C)
#include <i2c.h>
#endif
@@ -169,7 +170,11 @@ static int display_dram_config(void)
static int init_func_i2c(void)
{
puts("I2C: ");
+#ifdef CONFIG_SYS_I2C
+ i2c_init_all();
+#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
puts("ready\n");
return (0);
}