From: trem Date: Sat, 21 Sep 2013 16:13:34 +0000 (+0200) Subject: i2c: fix init on generic board X-Git-Tag: v2014.01-rc1~208^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=815a76f2ef08b700da611645c9329f632b681491;p=u-boot i2c: fix init on generic board On generic board, the i2c init initialize only one bus. But the new i2c subsystem allow to manage severals i2c bus. So in the case, instead of initializing a bus, we just set the current i2c bus. The initialization will be done in the i2c command. Signed-off-by: Philippe Reynes --- diff --git a/common/board_f.c b/common/board_f.c index 0ada1afe16..f0664bc2b2 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -249,7 +249,11 @@ void dram_init_banksize(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; }