summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/boot-common.c
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2018-08-20 20:34:00 -0500
committerTom Rini <trini@konsulko.com>2018-09-11 21:39:02 -0400
commit668146128aefc4c0e493056501092e90c85f1dd3 (patch)
tree1cc8aa760aaab561354184f279bd525db137cae6 /arch/arm/mach-omap2/boot-common.c
parent99571b41c6c21ccd3737971a51727e6f4d89126d (diff)
ARM: mach-omap2: Don't initialize I2C if DM_I2C is enabled
boot-common.c checks to see if I2C is enabled in SPL, but it doens't check for DM_I2C before initializing it. This will now only initialize the I2C is the DM_I2C is not enabled to avoid initializing it more than once. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/mach-omap2/boot-common.c')
-rw-r--r--arch/arm/mach-omap2/boot-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index d4a1e2e42c4..176d4f67cbb 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -202,7 +202,7 @@ void spl_board_init(void)
#if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
gpmc_init();
#endif
-#ifdef CONFIG_SPL_I2C_SUPPORT
+#if defined(CONFIG_SPL_I2C_SUPPORT) && !defined(CONFIG_DM_I2C)
i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
#endif
#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)