OMAP3: SPL: do not call I2C init if no I2C is set.
authorStefano Babic <sbabic@denx.de>
Thu, 15 Mar 2012 04:01:42 +0000 (04:01 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 27 Mar 2012 20:05:29 +0000 (22:05 +0200)
Call i2c initialization in spl_board_init only if I2C
is configured for the board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
arch/arm/cpu/armv7/omap3/board.c

index aabc651413dd5601e0830a227eb0f1d97bd0da71..1fee57436493e89a3bfc3ec8f980b64a0eb0c5cf 100644 (file)
@@ -92,7 +92,9 @@ u32 omap_boot_device(void)
 
 void spl_board_init(void)
 {
+#ifdef CONFIG_SPL_I2C_SUPPORT
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
 }
 #endif /* CONFIG_SPL_BUILD */