diff mbox series

[U-Boot,v2,1/2] ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled

Message ID 20180530081436.25793-1-judge.packham@gmail.com
State Awaiting Upstream
Delegated to: Stefan Roese
Headers show
Series [U-Boot,v2,1/2] ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled | expand

Commit Message

Chris Packham May 30, 2018, 8:14 a.m. UTC
The mach/config.h file would helpfully define CONFIG_SYS_I2C and
CONFIG_SYS_I2C_MVTWSI if CONFIG_CMD_I2C was defined by the board. This
conflicts with the way DM_I2C works. As a transitional measure don't
automatically define these if CONFIG_DM_I2C is defined. It should be
possible to remove this once all kirkwood boards are migrated to DM.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

Changes in v2: None

 arch/arm/mach-kirkwood/include/mach/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese May 30, 2018, 8:34 a.m. UTC | #1
On 30.05.2018 10:14, Chris Packham wrote:
> The mach/config.h file would helpfully define CONFIG_SYS_I2C and
> CONFIG_SYS_I2C_MVTWSI if CONFIG_CMD_I2C was defined by the board. This
> conflicts with the way DM_I2C works. As a transitional measure don't
> automatically define these if CONFIG_DM_I2C is defined. It should be
> possible to remove this once all kirkwood boards are migrated to DM.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> 
> Changes in v2: None

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Stefan Roese June 5, 2018, 9:24 a.m. UTC | #2
On 30.05.2018 10:14, Chris Packham wrote:
> The mach/config.h file would helpfully define CONFIG_SYS_I2C and
> CONFIG_SYS_I2C_MVTWSI if CONFIG_CMD_I2C was defined by the board. This
> conflicts with the way DM_I2C works. As a transitional measure don't
> automatically define these if CONFIG_DM_I2C is defined. It should be
> possible to remove this once all kirkwood boards are migrated to DM.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index 98639114dbdd..3482944c11de 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -116,7 +116,7 @@ 
 /*
  * I2C related stuff
  */
-#ifdef CONFIG_CMD_I2C
+#if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
 #ifndef CONFIG_SYS_I2C_SOFT
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MVTWSI