]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: mach-omap2: Don't initialize I2C if DM_I2C is enabled
authorAdam Ford <aford173@gmail.com>
Tue, 21 Aug 2018 01:34:00 +0000 (20:34 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 12 Sep 2018 01:39:02 +0000 (21:39 -0400)
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>
arch/arm/mach-omap2/boot-common.c

index d4a1e2e42c4e299434ceb4a431dd0eb2ccf15d96..176d4f67cbbf6d5933e790f499db634d7604d395 100644 (file)
@@ -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)