[U-Boot] [PATCH V12 09/14] OMAP3: SPL: do not call I2C init if no I2C is set.
Stefano Babic
sbabic at denx.de
Wed Jan 4 09:25:13 CET 2012
Call i2c initialization in spl_board_init only if I2C
is configured for the board.
Signed-off-by: Stefano Babic <sbabic at denx.de>
CC: Tom Rini <tom.rini at gmail.com>
CC: Wolfgang Denk <wd at denx.de>
CC: Simon Schwarz <simonschwarzcor at gmail.com>
---
V12:
- use CONFIG_SPL_I2C_SUPPORT to protect I2C code
arch/arm/cpu/armv7/omap3/board.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 1f33c63..1f6a3e9 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -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 */
--
1.7.5.4
More information about the U-Boot
mailing list