Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY

First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig.  Next, as you cannot
have SYS_I2C_LEGACY and DM_I2C at the same time, introduce
CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only
in SPL.  Finally, for some PowerPC cases we also need
CONFIG_TPL_SYS_I2C_LEGACY support.  Convert all of the existing users to
one or more symbols.

Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index e550703..a4cf7fd 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -277,7 +277,7 @@
 	 */
 	void *trace_buff;
 #endif
-#if defined(CONFIG_SYS_I2C_LEGACY)
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
 	/**
 	 * @cur_i2c_bus: currently used I2C bus
 	 */
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index aaf016c..167d44e 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -46,10 +46,4 @@
 #define CONFIG_SYS_MAXARGS	16
 #endif
 
-#if CONFIG_IS_ENABLED(DM_I2C)
-# ifdef CONFIG_SYS_I2C_LEGACY
-#  error "Cannot define CONFIG_SYS_I2C_LEGACY when CONFIG_DM_I2C is used"
-# endif
-#endif
-
 #endif	/* __CONFIG_FALLBACKS_H */
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index 1b8312b..c9d2010 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -40,7 +40,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index d061f45..6c2e974 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -49,7 +49,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_i2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index 8ac0086..950cc1f 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -70,7 +70,6 @@
 #define CONFIG_HOSTNAME		"M5253DEMO"
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h
index eb7823a..d4690aa 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -59,7 +59,6 @@
 #endif
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index a063b92..2b3ea7a 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -55,7 +55,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 4fc6d38..f0231ad 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -49,7 +49,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 7a9240a..113e07c 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -51,7 +51,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index d6ae419..2666f3a 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -165,7 +165,6 @@
 #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_IMMR+0x4600)
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h
index 8ebca99..b85a4f0 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -220,7 +220,6 @@
 #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_IMMR+0x4600)
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 0a136b4..2eed45d 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -203,7 +203,6 @@
 #define CONFIG_FSL_SERDES2	0xe3100
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index ac9afa1..1f81db1 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -206,7 +206,6 @@
 /*
  * I2C
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 9151847..5d8bb7e 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -295,7 +295,6 @@
  * I2C
  */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 10cd44c..ec0dad0 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -202,7 +202,6 @@
 /*
  * I2C
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index e8a9c94..ea17599 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -498,7 +498,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index c572875..4b65b2c 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -257,7 +257,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x118000
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index fbec1e6..8aacea5 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -418,7 +418,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	50000	/* I2C speed in Hz */
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C2_SPEED	50000	/* I2C speed in Hz */
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index fb215bb..85a5253 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -453,7 +453,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed in Hz */
 #define CONFIG_SYS_FSL_I2C2_SPEED	400000
 #define CONFIG_SYS_FSL_I2C3_SPEED	400000
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 156bb42..10c81ad 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -368,7 +368,6 @@
  * I2C
  */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SLAVE   0x7F
 #define CONFIG_SYS_FSL_I2C2_SLAVE  0x7F
 #define CONFIG_SYS_FSL_I2C3_SLAVE  0x7F
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 5b62e25..b31e482 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -320,7 +320,6 @@
  * I2C
  */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SLAVE   0x7F
 #define CONFIG_SYS_FSL_I2C2_SLAVE  0x7F
 #define CONFIG_SYS_FSL_I2C3_SLAVE  0x7F
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index c796b1d..ad2e1e2 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -155,7 +155,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x118000
 #define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index d9a777e..b03a1c4 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -310,7 +310,6 @@
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR + 0x4600)
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 2ea33e5..b72e497 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -58,7 +58,6 @@
 #define CONFIG_MCFTMR
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	80000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index 51585fc..bf54cfb 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -19,8 +19,6 @@
 #define CONFIG_SYS_NS16550_CLK		(48000000)
 #define CONFIG_SYS_NS16550_COM1		0x44e09000
 
-#define CONFIG_SYS_I2C_LEGACY
-
 #endif /* CONFIG_DM */
 
 #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index fae3720..8c00cdd 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -31,7 +31,6 @@
 #define CONFIG_POWER_PFUZE3000_I2C_ADDR	0x08
 
 /* I2C configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C2		/* Enable I2C bus 2 */
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index b5bf551..b6cbb0f 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -166,7 +166,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h
index 6889e8b..15cbd23 100644
--- a/include/configs/colibri_pxa270.h
+++ b/include/configs/colibri_pxa270.h
@@ -41,7 +41,7 @@
  */
 
 /* I2C support */
-#ifdef CONFIG_SYS_I2C_LEGACY
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
 #define CONFIG_SYS_I2C_PXA
 #define CONFIG_PXA_STD_I2C
 #define CONFIG_PXA_PWR_I2C
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 21b48fb..1dcbffa 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -267,7 +267,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x118000
diff --git a/include/configs/db-88f6720.h b/include/configs/db-88f6720.h
index 79b3ea0..3aa3617 100644
--- a/include/configs/db-88f6720.h
+++ b/include/configs/db-88f6720.h
@@ -17,7 +17,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index 4c359f9..78802e5 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -11,7 +11,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h
index 214c6b8..ba22fcd 100644
--- a/include/configs/db-mv784mp-gp.h
+++ b/include/configs/db-mv784mp-gp.h
@@ -18,7 +18,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 33d71a7..caabd97 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -40,7 +40,6 @@
 /*
  * I2C
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_SPEED		100000
 
 /*
diff --git a/include/configs/ds414.h b/include/configs/ds414.h
index dc5c453..1205e85 100644
--- a/include/configs/ds414.h
+++ b/include/configs/ds414.h
@@ -20,7 +20,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index 77584fa..37bf381 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -194,7 +194,6 @@
  * I2C
  */
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x00000300
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index 612111d..686d122 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -153,7 +153,6 @@
  * I2C related stuff
  */
 #ifdef CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		ORION5X_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index b117176..ecd0ee2 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -26,7 +26,6 @@
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 
 /* I2C config */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index 401b50d..a4c312f 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -21,7 +21,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 8b60ad5..e650cf6 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -97,8 +97,6 @@
 /* I2C */
 #define CONFIG_SYS_MAX_I2C_BUS	1
 
-#define CONFIG_SYS_I2C_LEGACY
-
 #define I2C_SOFT_DECLARATIONS
 
 #define GPIO_I2C_SCL		AT91_PIO_PORTA, 24
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index c345fb2..b81a4c4 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -36,7 +36,6 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 4f27273..d9f19a5 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -42,7 +42,6 @@
 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 19d3fbf..fc0d8b1 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -163,7 +163,6 @@
 /*
  * I2C setup
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_FSL
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index a6569d5..474ef2b 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -37,8 +37,6 @@
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_PCA9450
 
-#define CONFIG_SYS_I2C_LEGACY
-
 #endif
 
 #if defined(CONFIG_CMD_NET)
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index af81a43..859e8ec 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -44,7 +44,6 @@
 #undef CONFIG_DM_PMIC
 #undef CONFIG_DM_PMIC_PFUZE100
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index 8038abc..40ae866 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -41,7 +41,6 @@
 #undef CONFIG_DM_PMIC
 #undef CONFIG_DM_PMIC_PFUZE100
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index ecf4378..7ccc35b 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -62,7 +62,6 @@
 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_NUM_I2C_BUSES	4
 #define CONFIG_SYS_I2C_MAX_HOPS		1
 #define CONFIG_SYS_I2C_FSL
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index a52df29..7dff0f4 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -90,7 +90,6 @@
  * I2C related stuff
  */
 #undef CONFIG_I2C_MVTWSI
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_INIT_BOARD
 
 #define	CONFIG_KIRKWOOD_GPIO		/* Enable GPIO Support */
diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h
index a4cc477..35da691 100644
--- a/include/configs/km/pg-wcom-ls102xa.h
+++ b/include/configs/km/pg-wcom-ls102xa.h
@@ -191,7 +191,6 @@
 /*
  * I2C
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_INIT_BOARD
 #define CONFIG_SYS_I2C_SPEED		100000
 
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h
index 059c54e..af743ce 100644
--- a/include/configs/kzm9g.h
+++ b/include/configs/kzm9g.h
@@ -83,7 +83,6 @@
 #define CONFIG_NFS_TIMEOUT 10000UL
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_SH
 #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 5
 #define CONFIG_SYS_I2C_SH_BASE0	0xE6820000
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index 8c2c8e1..5de81c0 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -47,7 +47,6 @@
 /*
  * I2C Configuration
  */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_DAVINCI_I2C_SPEED		400000
 #define CONFIG_SYS_DAVINCI_I2C_SLAVE   10 /* Bogus, master-only in U-Boot */
 
diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 670b55d..701292c 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -56,7 +56,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #else
 #define CONFIG_I2C_SET_DEFAULT_BUS_NUM
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index ce42081..4ea9255 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -99,7 +99,6 @@
  */
 
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #else
 #define CONFIG_I2C_SET_DEFAULT_BUS_NUM
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 4c5746e..f50cb98 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -331,7 +331,6 @@
  * I2C
  */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #else
 #define CONFIG_I2C_SET_DEFAULT_BUS_NUM
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h
index da4510f..e155233 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -105,7 +105,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #else
 #define CONFIG_I2C_SET_DEFAULT_BUS_NUM
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 11699cb..9fb0f80 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -209,7 +209,6 @@
  * I2C
  */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #else
 #define CONFIG_I2C_SET_DEFAULT_BUS_NUM
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h
index 89614b6..4875474 100644
--- a/include/configs/ls1028a_common.h
+++ b/include/configs/ls1028a_common.h
@@ -44,9 +44,6 @@
 #endif
 
 /* I2C */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
-#endif
 
 /* Serial Port */
 #define CONFIG_SYS_NS16550_SERIAL
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 834c3e6..5de34ad 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -150,7 +150,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 289acc0..51e3acb 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -134,7 +134,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index 3f0679c..638fc49 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -61,9 +61,6 @@
 #endif
 
 /* I2C */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
-#endif
 
 
 /* Serial Port */
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 4527336..a7b1fef 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -74,9 +74,6 @@
 #endif
 
 /* I2C */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
-#endif
 
 /* Serial Port */
 #define CONFIG_SYS_NS16550_SERIAL
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index bd117da..d709e5d 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -88,7 +88,6 @@
  * I2C
  */
 #ifdef CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/maxbcm.h b/include/configs/maxbcm.h
index 691ef2f..8b6d0b0 100644
--- a/include/configs/maxbcm.h
+++ b/include/configs/maxbcm.h
@@ -17,7 +17,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index e69130d..ece4ad7 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -36,7 +36,6 @@
 #define CONFIG_MXC_USB_FLAGS	0
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index 626dbd5..c18135f 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -51,7 +51,6 @@
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 9546887..8cf0d33 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -38,7 +38,6 @@
 #endif
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 0c40750..91798f9 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -21,7 +21,6 @@
 #define CONFIG_MXC_UART_BASE	       UART2_BASE
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/novena.h b/include/configs/novena.h
index cb4f3a6..60bace6 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -52,7 +52,6 @@
 #endif
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index a4684f0..6de85d0 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -464,7 +464,6 @@
 
 /* I2C */
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_FSL_I2C_SPEED	400000
 #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
 #define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h
index 58ead45..fbb804d 100644
--- a/include/configs/phycore_imx8mp.h
+++ b/include/configs/phycore_imx8mp.h
@@ -33,8 +33,6 @@
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_PCA9450
 
-#define CONFIG_SYS_I2C_LEGACY
-
 #endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index f5d2c23..6b94ad2 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -126,7 +126,6 @@
 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
 /* I2C configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1
 #define CONFIG_SYS_I2C_MXC_I2C2
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index 89b3d27..2df532b 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -40,7 +40,6 @@
 #undef CONFIG_DM_MMC
 #undef CONFIG_DM_PMIC
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index a4b4c48..9cf3c67 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -73,7 +73,6 @@
 
 
 /* I2C Configuration */
-#define CONFIG_SYS_I2C_LEGACY
 
 /* Defines for SPL */
 #define CONFIG_SPL_MAX_SIZE		(SRAM_SCRATCH_SPACE_ADDR - \
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 2c89a6b..7f2c805 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -73,7 +73,6 @@
 #endif
 
 /* I2C - Bit-bashed */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SOFT_I2C_READ_REPEATED_START
 #define I2C_INIT do {							\
 		at91_set_gpio_output(AT91_PIN_PA23, 1);			\
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 6ef96df..844e2f1 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -53,7 +53,6 @@
  * I2C
  */
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MULTI_BUS
 
 /*
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index dd2fba1..292b8c3 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -198,7 +198,6 @@
     defined CONFIG_I2C2_ENABLE || defined CONFIG_I2C3_ENABLE || \
     defined CONFIG_I2C4_ENABLE || defined CONFIG_R_I2C_ENABLE
 #if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_SPEED		400000
 #define CONFIG_SYS_I2C_SLAVE		0x7f
 #endif
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index f1113aa..a47d119 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -56,7 +56,6 @@
 /* EHCI */
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO	25
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW	0x07
 
 /*
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index 23dc661..417b41d 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -23,7 +23,6 @@
  */
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 #define CONFIG_I2C_MVTWSI_BASE1		MVEBU_TWSI1_BASE
 #define CONFIG_SYS_I2C_SLAVE		0x0
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 4fcf741..0b02324 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -87,9 +87,6 @@
 #define CONFIG_SYS_PTV			2	/* Divisor: 2^(PTV+1) => 8 */
 
 /* If DM_I2C, enable non-DM I2C support */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
-#endif
 
 /*
  * The following are general good-enough settings for U-Boot.  We set a
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 1e6f038..b5ccfdc 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -118,7 +118,6 @@
 
 #ifdef CONFIG_SPL_BUILD
 /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
-#undef CONFIG_SYS_I2C_LEGACY
 #endif
 
 #endif /* __CONFIG_TI_OMAP4_COMMON_H */
diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h
index aa98a51..e68e96d 100644
--- a/include/configs/tqma6_wru4.h
+++ b/include/configs/tqma6_wru4.h
@@ -30,6 +30,5 @@
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 
 #endif /* __CONFIG_TQMA6_WRU4_H */
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 813e743..275727da 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -71,7 +71,6 @@
 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
 /* I2C configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1
 #define CONFIG_SYS_I2C_SPEED		100000
diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h
index 648232b..4fb487b 100644
--- a/include/configs/usbarmory.h
+++ b/include/configs/usbarmory.h
@@ -32,7 +32,6 @@
 #define CONFIG_MXC_USB_FLAGS	0
 
 /* I2C */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 4f11018..a96d1c6 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -42,7 +42,6 @@
 #define CONFIG_FEC_MXC_PHYADDR          0
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index e90eaf3..5c4c346 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -43,7 +43,6 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC4_BASE_ADDR
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
diff --git a/include/configs/warp.h b/include/configs/warp.h
index e3beee0..5a190d7 100644
--- a/include/configs/warp.h
+++ b/include/configs/warp.h
@@ -53,7 +53,6 @@
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
 /* I2C Configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 5c54abc..27a8919 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -47,7 +47,6 @@
  * I2C driver
  */
 
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_SPEED 350000
 
 /*
diff --git a/include/configs/xpress.h b/include/configs/xpress.h
index e4678e3..a04ce86 100644
--- a/include/configs/xpress.h
+++ b/include/configs/xpress.h
@@ -22,7 +22,6 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
 
 /* I2C configs */
-#define CONFIG_SYS_I2C_LEGACY
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
diff --git a/include/i2c.h b/include/i2c.h
index 3d9ecab..0786705 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -762,7 +762,7 @@
 void i2c_init(int speed, int slaveaddr);
 void i2c_init_board(void);
 
-#ifdef CONFIG_SYS_I2C_LEGACY
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
 /*
  * i2c_get_bus_num:
  *
@@ -942,7 +942,7 @@
  * only for backwardcompatibility, should go away if we switched
  * completely to new multibus support.
  */
-#if defined(CONFIG_SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS)
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS)
 # if !defined(CONFIG_SYS_MAX_I2C_BUS)
 #  define CONFIG_SYS_MAX_I2C_BUS		2
 # endif