Skip to contentSkip to conversation

ARM: mach-omap2: Don't initialize I2C if DM_I2C is enabled

PATCH In review Adam Ford 3 participants 3 messages Aug 21, 2018 – Sep 18, 2018

Subsystems (3)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 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.

arch/arm/mach-omap2/boot-common.c +1 -1
index d4a1e2e42c..176d4f67cb 100644
@@ -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)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 ARM: mach-omap2: Don't initialize I2C if DM_I2C is enabled

Quoted 6 lines · Adam Ford

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.

#2 lore raw
In reply to Adam Ford

arch/arm/mach-omap2/boot-common.c

Quoted 10 lines · Adam Ford

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.

arch/arm/mach-omap2/boot-common.c +0 -0
index d4a1e2e42c..176d4f67cb 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180918/44deb91a/attachment.sig>