[PATCH 12/17] i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACY
Simon Glass
sjg at chromium.org
Sun Jul 11 05:14:32 CEST 2021
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and
CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less
than a year away.
Also we want to have a CONFIG_I2C for U-Boot proper just like we have
CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules.
Rename this symbol so it is clear it is going away.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
README | 7 ++++--
arch/arm/cpu/armv8/fsl-layerscape/soc.c | 2 +-
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 +-
.../include/asm/arch-fsl-layerscape/config.h | 2 +-
arch/arm/mach-kirkwood/include/mach/config.h | 2 +-
board/Arcturus/ucp1020/spl.c | 2 +-
board/compulab/common/Makefile | 2 +-
board/compulab/common/eeprom.h | 2 +-
board/freescale/p1_p2_rdb_pc/spl.c | 2 +-
board/renesas/draak/draak.c | 2 +-
board/renesas/salvator-x/salvator-x.c | 4 ++--
board/renesas/ulcb/ulcb.c | 2 +-
board/somlabs/visionsom-6ull/visionsom-6ull.c | 2 +-
board/tqc/tqma6/tqma6.c | 4 ++--
cmd/date.c | 4 ++--
cmd/eeprom.c | 2 +-
cmd/i2c.c | 24 +++++++++----------
common/board_f.c | 4 ++--
common/stdio.c | 2 +-
drivers/i2c/Makefile | 2 +-
include/asm-generic/global_data.h | 2 +-
include/config_fallbacks.h | 4 ++--
include/configs/M5208EVBE.h | 2 +-
include/configs/M52277EVB.h | 2 +-
include/configs/M5235EVB.h | 2 +-
include/configs/M5253DEMO.h | 2 +-
include/configs/M5275EVB.h | 2 +-
include/configs/M53017EVB.h | 2 +-
include/configs/M5329EVB.h | 2 +-
include/configs/M5373EVB.h | 2 +-
include/configs/M54451EVB.h | 2 +-
include/configs/M54455EVB.h | 2 +-
include/configs/MPC8349EMDS.h | 2 +-
include/configs/MPC8349EMDS_SDRAM.h | 2 +-
include/configs/MPC837XERDB.h | 2 +-
include/configs/MPC8540ADS.h | 2 +-
include/configs/MPC8548CDS.h | 2 +-
include/configs/MPC8560ADS.h | 2 +-
include/configs/P1010RDB.h | 2 +-
include/configs/P2041RDB.h | 2 +-
include/configs/T102xRDB.h | 2 +-
include/configs/T104xRDB.h | 2 +-
include/configs/T208xQDS.h | 2 +-
include/configs/T208xRDB.h | 2 +-
include/configs/T4240RDB.h | 2 +-
include/configs/UCP1020.h | 2 +-
include/configs/astro_mcf5373l.h | 2 +-
include/configs/bur_am335x_common.h | 2 +-
include/configs/cl-som-imx7.h | 2 +-
include/configs/cm_fx6.h | 2 +-
include/configs/colibri_pxa270.h | 2 +-
include/configs/corenet_ds.h | 2 +-
include/configs/db-88f6720.h | 2 +-
include/configs/db-88f6820-gp.h | 2 +-
include/configs/db-mv784mp-gp.h | 2 +-
include/configs/devkit3250.h | 2 +-
include/configs/ds414.h | 2 +-
include/configs/eb_cpu5282.h | 2 +-
include/configs/edminiv2.h | 2 +-
include/configs/el6x_common.h | 2 +-
include/configs/embestmx6boards.h | 2 +-
include/configs/ethernut5.h | 2 +-
include/configs/flea3.h | 2 +-
include/configs/gw_ventana.h | 2 +-
include/configs/ids8313.h | 2 +-
include/configs/imx8mp_evk.h | 2 +-
include/configs/imx8mq_evk.h | 2 +-
include/configs/imx8mq_phanbell.h | 2 +-
include/configs/km/km-mpc83xx.h | 2 +-
include/configs/km/km_arm.h | 2 +-
include/configs/km/pg-wcom-ls102xa.h | 2 +-
include/configs/kzm9g.h | 2 +-
include/configs/legoev3.h | 2 +-
include/configs/ls1012a_common.h | 2 +-
include/configs/ls1021aiot.h | 2 +-
include/configs/ls1021aqds.h | 2 +-
include/configs/ls1021atsn.h | 2 +-
include/configs/ls1021atwr.h | 2 +-
include/configs/ls1028a_common.h | 2 +-
include/configs/ls1043a_common.h | 2 +-
include/configs/ls1046a_common.h | 2 +-
include/configs/ls1088a_common.h | 2 +-
include/configs/ls2080a_common.h | 2 +-
include/configs/m53menlo.h | 2 +-
include/configs/maxbcm.h | 2 +-
include/configs/mx53loco.h | 2 +-
include/configs/mx6sabreauto.h | 2 +-
include/configs/mx6sabresd.h | 2 +-
include/configs/nitrogen6x.h | 2 +-
include/configs/novena.h | 2 +-
include/configs/p1_p2_rdb_pc.h | 2 +-
include/configs/phycore_imx8mp.h | 2 +-
include/configs/pico-imx7d.h | 2 +-
include/configs/pico-imx8mq.h | 2 +-
include/configs/siemens-am33x-common.h | 2 +-
include/configs/snapper9260.h | 2 +-
include/configs/sniper.h | 2 +-
include/configs/sunxi-common.h | 2 +-
include/configs/t4qds.h | 2 +-
include/configs/tam3517-common.h | 2 +-
include/configs/theadorable.h | 2 +-
include/configs/ti_armv7_common.h | 2 +-
include/configs/ti_omap4_common.h | 2 +-
include/configs/tqma6_wru4.h | 2 +-
include/configs/udoo_neo.h | 2 +-
include/configs/usbarmory.h | 2 +-
include/configs/vf610twr.h | 2 +-
include/configs/vining_2000.h | 2 +-
include/configs/warp.h | 2 +-
include/configs/work_92105.h | 2 +-
include/configs/xpress.h | 2 +-
include/i2c.h | 8 +++----
scripts/config_whitelist.txt | 2 +-
113 files changed, 136 insertions(+), 133 deletions(-)
diff --git a/README b/README
index 63ac8d3fcf6..4fdc49fbb9c 100644
--- a/README
+++ b/README
@@ -1461,9 +1461,12 @@ The following options need to be configured:
In such cases CONFIG_GPIO_LED_INVERTED_TABLE may be defined
with a list of GPIO LEDs that have inverted polarity.
-- I2C Support: CONFIG_SYS_I2C
+- I2C Support: CONFIG_SYS_I2C_LEGACY
- This enable the NEW i2c subsystem, and will allow you to use
+ Note: This is deprecated in favour of driver model. Use
+ CONFIG_DM_I2C instead.
+
+ This enable the legacy i2c subsystem, and will allow you to use
i2c commands at the u-boot command line (as long as you set
CONFIG_SYS_I2C_SOFT_SPEED and CONFIG_SYS_I2C_SOFT_SLAVE
for defining speed and slave address
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index c3cd6c7ac7f..0562d287058 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -329,7 +329,7 @@ static void erratum_rcw_src(void)
#ifdef CONFIG_SYS_FSL_ERRATUM_A009203
static void erratum_a009203(void)
{
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
u8 __iomem *ptr;
#ifdef I2C1_BASE_ADDR
ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG);
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index b3f1148f9df..b24e137955c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -88,7 +88,7 @@ void board_init_f(ulong dummy)
preloader_console_init();
spl_set_bd();
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
#ifdef CONFIG_SPL_I2C_SUPPORT
i2c_init_all();
#endif
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index da7ca0587cd..3675ce763d1 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -184,7 +184,7 @@
#define TZPC_BASE 0x02200000
#define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_EARLY_INIT
#endif
#define SRDS_MAX_LANES 8
diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index f5538f4a903..a4b5630c46f 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -96,7 +96,7 @@
*/
#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
#ifndef CONFIG_SYS_I2C_SOFT
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#endif
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index 437e975fdf7..f7c4960da7c 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -106,7 +106,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
env_relocate();
#endif
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
i2c_init_all();
#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
diff --git a/board/compulab/common/Makefile b/board/compulab/common/Makefile
index 7ba92f5db03..842fb3b6a62 100644
--- a/board/compulab/common/Makefile
+++ b/board/compulab/common/Makefile
@@ -5,6 +5,6 @@
# Author: Igor Grinberg <grinberg at compulab.co.il>
obj-y += common.o
-obj-$(CONFIG_SYS_I2C) += eeprom.o
+obj-$(CONFIG_SYS_I2C_LEGACY) += eeprom.o
obj-$(CONFIG_LCD) += omap3_display.o
obj-$(CONFIG_SMC911X) += omap3_smc911x.o
diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h
index a9c0203b81a..51c8acf3b82 100644
--- a/board/compulab/common/eeprom.h
+++ b/board/compulab/common/eeprom.h
@@ -10,7 +10,7 @@
#define _EEPROM_
#include <errno.h>
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
u32 cl_eeprom_get_board_rev(uint eeprom_bus);
int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 010f4639ee1..90188b099a9 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -99,7 +99,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
env_relocate();
#endif
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
i2c_init_all();
#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 1d76f95aedf..0aaae815c01 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
+#if defined(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index 071076a336a..1802547bbfb 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -37,7 +37,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
+#if defined(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
@@ -78,7 +78,7 @@ int board_init(void)
void reset_cpu(void)
{
-#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
+#if defined(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
i2c_reg_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x20, 0x80);
#else
/* only CA57 ? */
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 7ba1948659f..ffc4eb9ff32 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -35,7 +35,7 @@ DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
-#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
+#if defined(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH)
/* DVFS for reset */
mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
#endif
diff --git a/board/somlabs/visionsom-6ull/visionsom-6ull.c b/board/somlabs/visionsom-6ull/visionsom-6ull.c
index 076c641d8a9..c26e7b0555e 100644
--- a/board/somlabs/visionsom-6ull/visionsom-6ull.c
+++ b/board/somlabs/visionsom-6ull/visionsom-6ull.c
@@ -104,7 +104,7 @@ int board_init(void)
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
#endif
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 26d557cece9..4f86a929016 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -171,7 +171,7 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
#endif
#endif
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
static struct i2c_pads_info tqma6_i2c3_pads = {
/* I2C3: on board LM75, M24C64, */
.scl = {
@@ -216,7 +216,7 @@ int board_init(void)
#ifndef CONFIG_DM_SPI
tqma6_iomuxc_spi();
#endif
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
tqma6_setup_i2c();
#endif
diff --git a/cmd/date.c b/cmd/date.c
index 0e118947531..e377cfe165e 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -46,7 +46,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Cannot find RTC: err=%d\n", rcode);
return CMD_RET_FAILURE;
}
-#elif defined(CONFIG_SYS_I2C)
+#elif defined(CONFIG_SYS_I2C_LEGACY)
old_bus = i2c_get_bus_num();
i2c_set_bus_num(CONFIG_SYS_RTC_BUS_NUM);
#else
@@ -119,7 +119,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
}
/* switch back to original I2C bus */
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
i2c_set_bus_num(old_bus);
#elif !defined(CONFIG_DM_RTC)
I2C_SET_BUS(old_bus);
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index b3fd37c8274..efd6f3ac032 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -75,7 +75,7 @@ void eeprom_init(int bus)
/* I2C EEPROM */
#if CONFIG_IS_ENABLED(DM_I2C)
eeprom_i2c_bus = bus;
-#elif defined(CONFIG_SYS_I2C)
+#elif defined(CONFIG_SYS_I2C_LEGACY)
if (bus >= 0)
i2c_set_bus_num(bus);
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 5d0e207874f..0e1895ad65d 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -98,7 +98,7 @@ static uint i2c_mm_last_alen;
* pairs. The following macros take care of this */
#if defined(CONFIG_SYS_I2C_NOPROBES)
-#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS)
+#if defined(CONFIG_SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS)
static struct
{
uchar bus;
@@ -114,7 +114,7 @@ static uchar i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES;
#define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */
#define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a))
#define NO_PROBE_ADDR(i) i2c_no_probes[(i)]
-#endif /* defined(CONFIG_SYS_I2C) */
+#endif /* defined(CONFIG_SYS_I2C_LEGACY) */
#endif
#define DISP_LINE_LEN 16
@@ -209,7 +209,7 @@ void i2c_init_board(void)
*
* Returns I2C bus speed in Hz.
*/
-#if !defined(CONFIG_SYS_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
+#if !defined(CONFIG_SYS_I2C_LEGACY) && !CONFIG_IS_ENABLED(DM_I2C)
/*
* TODO: Implement architecture-specific get/set functions
* Should go away, if we switched completely to new multibus support
@@ -1725,7 +1725,7 @@ static void show_bus(struct udevice *bus)
*
* Returns zero always.
*/
-#if defined(CONFIG_SYS_I2C) || CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -1811,7 +1811,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS) || \
+#if defined(CONFIG_SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS) || \
CONFIG_IS_ENABLED(DM_I2C)
static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
@@ -1834,7 +1834,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Current bus is %d\n", bus_no);
} else {
bus_no = simple_strtoul(argv[1], NULL, 10);
-#if defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY)
if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES) {
printf("Invalid bus %d\n", bus_no);
return -1;
@@ -1852,7 +1852,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
return ret ? CMD_RET_FAILURE : 0;
}
-#endif /* defined(CONFIG_SYS_I2C) */
+#endif /* defined(CONFIG_SYS_I2C_LEGACY) */
/**
* do_i2c_bus_speed() - Handle the "i2c speed" command-line command
@@ -1951,7 +1951,7 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Error: Not supported by the driver\n");
return CMD_RET_FAILURE;
}
-#elif defined(CONFIG_SYS_I2C)
+#elif defined(CONFIG_SYS_I2C_LEGACY)
i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -1960,11 +1960,11 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
}
static struct cmd_tbl cmd_i2c_sub[] = {
-#if defined(CONFIG_SYS_I2C) || CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_show_bus, "", ""),
#endif
U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""),
-#if defined(CONFIG_SYS_I2C) || \
+#if defined(CONFIG_SYS_I2C_LEGACY) || \
defined(CONFIG_I2C_MULTI_BUS) || CONFIG_IS_ENABLED(DM_I2C)
U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""),
#endif /* CONFIG_I2C_MULTI_BUS */
@@ -2036,12 +2036,12 @@ static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
/***************************************************/
#ifdef CONFIG_SYS_LONGHELP
static char i2c_help_text[] =
-#if defined(CONFIG_SYS_I2C) || CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C)
"bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
"i2c " /* That's the prefix for the crc32 command below. */
#endif
"crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
-#if defined(CONFIG_SYS_I2C) || \
+#if defined(CONFIG_SYS_I2C_LEGACY) || \
defined(CONFIG_I2C_MULTI_BUS) || CONFIG_IS_ENABLED(DM_I2C)
"i2c dev [dev] - show or set current I2C bus\n"
#endif /* CONFIG_I2C_MULTI_BUS */
diff --git a/common/board_f.c b/common/board_f.c
index c1b8e63e560..f2746537c96 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -244,7 +244,7 @@ __weak int dram_init_banksize(void)
return 0;
}
-#if defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY)
static int init_func_i2c(void)
{
puts("I2C: ");
@@ -871,7 +871,7 @@ static const init_fnc_t init_sequence_f[] = {
misc_init_f,
#endif
INIT_FUNC_WATCHDOG_RESET
-#if defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY)
init_func_i2c,
#endif
#if defined(CONFIG_VID) && !defined(CONFIG_SPL)
diff --git a/common/stdio.c b/common/stdio.c
index d4acc5256c1..4083e4edb8f 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -336,7 +336,7 @@ int stdio_add_devices(void)
dev->name);
}
}
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
i2c_init_all();
#endif
if (IS_ENABLED(CONFIG_DM_VIDEO)) {
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 06a1150f03d..c2eb24e0f7b 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -11,7 +11,7 @@ obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o
obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o
obj-$(CONFIG_I2C_MV) += mv_i2c.o
-obj-$(CONFIG_SYS_I2C) += i2c_core.o
+obj-$(CONFIG_SYS_I2C_LEGACY) += i2c_core.o
obj-$(CONFIG_SYS_I2C_ASPEED) += ast_i2c.o
obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o
obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 5fed4db23f1..e55070303fe 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -277,7 +277,7 @@ struct global_data {
*/
void *trace_buff;
#endif
-#if defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C_LEGACY)
/**
* @cur_i2c_bus: currently used I2C bus
*/
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index a318926fe8e..aaf016c0459 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -47,8 +47,8 @@
#endif
#if CONFIG_IS_ENABLED(DM_I2C)
-# ifdef CONFIG_SYS_I2C
-# error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
+# ifdef CONFIG_SYS_I2C_LEGACY
+# error "Cannot define CONFIG_SYS_I2C_LEGACY when CONFIG_DM_I2C is used"
# endif
#endif
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index fc389b8e87f..1b8312bbc07 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -40,7 +40,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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/M52277EVB.h b/include/configs/M52277EVB.h
index 0428be729b2..9c228c4bd55 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -93,7 +93,7 @@
#define CONFIG_MCFTMR
/* I2c */
-#define CONFIG_SYS_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 4ab3d4831c7..d061f458708 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -49,7 +49,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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 54f6fa7c167..8ac0086629d 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -70,7 +70,7 @@
#define CONFIG_HOSTNAME "M5253DEMO"
/* I2C */
-#define CONFIG_SYS_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 ed93f4ad78a..eb7823a98a5 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -59,7 +59,7 @@
#endif
/* I2C */
-#define CONFIG_SYS_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 b934dc13889..a063b92a643 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -55,7 +55,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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 5c88f09f64f..4fc6d381924 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -49,7 +49,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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 f94cc02905d..7a9240a5717 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -51,7 +51,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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/M54451EVB.h b/include/configs/M54451EVB.h
index f5bafb70e77..58c58f669dc 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -101,7 +101,7 @@
#define CONFIG_MCFTMR
/* I2c */
-#define CONFIG_SYS_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/M54455EVB.h b/include/configs/M54455EVB.h
index f3621d6326e..98d954c1bdf 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -126,7 +126,7 @@
#define CONFIG_MCFTMR
/* I2c */
-#define CONFIG_SYS_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 2cf2e2de5e6..4dad6a58ff5 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -165,7 +165,7 @@
#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
/* I2C */
-#define CONFIG_SYS_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 cfec59e8605..f7c13d417f8 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -220,7 +220,7 @@
#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
/* I2C */
-#define CONFIG_SYS_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 ae368a1f1e3..e16a5930ad8 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -203,7 +203,7 @@
#define CONFIG_FSL_SERDES2 0xe3100
/* I2C */
-#define CONFIG_SYS_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 af90fe167a7..d843ba1ff78 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -206,7 +206,7 @@
/*
* I2C
*/
-#define CONFIG_SYS_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 9f83931bed5..2046bf215b2 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -295,7 +295,7 @@ extern unsigned long get_clock_freq(void);
* I2C
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 5e1bef8f3b0..464e7c72844 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -203,7 +203,7 @@
/*
* I2C
*/
-#define CONFIG_SYS_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 1b68fd10728..f5209e17964 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -526,7 +526,7 @@ extern unsigned long get_sdram_size(void);
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 715154a0ddf..b5b159406a4 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -260,7 +260,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 35b11ad88a8..1b4720db5c8 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -423,7 +423,7 @@ unsigned long get_board_ddr_clk(void);
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 ea239f74c14..57a0bf5287e 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -453,7 +453,7 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 7bc792b8d19..b8d1693017e 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -371,7 +371,7 @@ unsigned long get_board_ddr_clk(void);
* I2C
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 9449e30bfca..a04a49d0339 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -323,7 +323,7 @@ unsigned long get_board_ddr_clk(void);
* I2C
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 139beae08db..aa185be7411 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -155,7 +155,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 c3cc72e13f7..d9a777ea1a0 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -310,7 +310,7 @@
#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR + 0x4600)
/* I2C */
-#define CONFIG_SYS_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 891240c7e22..2ea33e5eff2 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -58,7 +58,7 @@
#define CONFIG_MCFTMR
/* I2C */
-#define CONFIG_SYS_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 42e3e568be7..042cb4637ba 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -20,7 +20,7 @@
#define CONFIG_SYS_NS16550_COM1 0x44e09000
#define CONFIG_I2C
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif /* CONFIG_DM */
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index 0ef55b77133..b8928ba6c41 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -31,7 +31,7 @@
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
/* I2C configs */
-#define CONFIG_SYS_I2C
+#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 9892fb88170..a496a80e02e 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -166,7 +166,7 @@
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
/* I2C */
-#define CONFIG_SYS_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 3dedcdaad28..6889e8b4e55 100644
--- a/include/configs/colibri_pxa270.h
+++ b/include/configs/colibri_pxa270.h
@@ -41,7 +41,7 @@
*/
/* I2C support */
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_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 d0843c284e6..924093e6b05 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -270,7 +270,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 213883ef0f4..83c173243c2 100644
--- a/include/configs/db-88f6720.h
+++ b/include/configs/db-88f6720.h
@@ -18,7 +18,7 @@
#define CONFIG_SYS_TCLK 200000000 /* 200MHz */
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index ed851bc6704..5a6b42854c4 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -13,7 +13,7 @@
#define CONFIG_SYS_TCLK 250000000 /* 250MHz */
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h
index 3e20516e94b..319a291a92a 100644
--- a/include/configs/db-mv784mp-gp.h
+++ b/include/configs/db-mv784mp-gp.h
@@ -19,7 +19,7 @@
#define CONFIG_SYS_TCLK 250000000 /* 250MHz */
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 465d9ce8e99..33d71a7042b 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -40,7 +40,7 @@
/*
* I2C
*/
-#define CONFIG_SYS_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 c8b45066cc7..80fd148f712 100644
--- a/include/configs/ds414.h
+++ b/include/configs/ds414.h
@@ -21,7 +21,7 @@
#define CONFIG_SYS_TCLK 250000000 /* 250MHz */
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index ab9daa4074a..77584fa7a5d 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -194,7 +194,7 @@
* I2C
*/
-#define CONFIG_SYS_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 949ff55624d..7e0a0ea8990 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -153,7 +153,7 @@
* I2C related stuff
*/
#ifdef CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 ORION5X_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index 9ee7fee2d72..b11717637a1 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -26,7 +26,7 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* I2C config */
-#define CONFIG_SYS_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/embestmx6boards.h b/include/configs/embestmx6boards.h
index a29eec00ae6..401b50d51be 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -21,7 +21,7 @@
#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
/* I2C Configs */
-#define CONFIG_SYS_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/ethernut5.h b/include/configs/ethernut5.h
index ca249d9d2b5..3f266543b92 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -97,7 +97,7 @@
/* I2C */
#define CONFIG_SYS_MAX_I2C_BUS 1
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
#define CONFIG_SYS_I2C_SOFT_SPEED 100000
#define CONFIG_SYS_I2C_SOFT_SLAVE 0
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index f4753cf7c51..c345fb253d5 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -36,7 +36,7 @@
/*
* Hardware drivers
*/
-#define CONFIG_SYS_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/gw_ventana.h b/include/configs/gw_ventana.h
index 4f2f323b777..e9b5f3f3a6e 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -39,7 +39,7 @@
#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* I2C Configs */
-#define CONFIG_SYS_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/ids8313.h b/include/configs/ids8313.h
index 362e2892d19..19d3fbff9c2 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -163,7 +163,7 @@
/*
* I2C setup
*/
-#define CONFIG_SYS_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/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index d1bc09e8251..a6569d5566e 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -37,7 +37,7 @@
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 1e286050bc6..844b16ce05c 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -44,7 +44,7 @@
#undef CONFIG_DM_PMIC
#undef CONFIG_DM_PMIC_PFUZE100
-#define CONFIG_SYS_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/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index daee0946881..70d2da14a09 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -41,7 +41,7 @@
#undef CONFIG_DM_PMIC
#undef CONFIG_DM_PMIC_PFUZE100
-#define CONFIG_SYS_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/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index 7aacd37c8a7..ecf4378bf1c 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -62,7 +62,7 @@
#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
/* I2C */
-#define CONFIG_SYS_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 4115906c5d7..179e145b5ff 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -90,7 +90,7 @@
* I2C related stuff
*/
#undef CONFIG_I2C_MVTWSI
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
#define CONFIG_SYS_I2C_INIT_BOARD
diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h
index eb480a34a67..a4cc4777290 100644
--- a/include/configs/km/pg-wcom-ls102xa.h
+++ b/include/configs/km/pg-wcom-ls102xa.h
@@ -191,7 +191,7 @@
/*
* I2C
*/
-#define CONFIG_SYS_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 0724df154e9..059c54e21ed 100644
--- a/include/configs/kzm9g.h
+++ b/include/configs/kzm9g.h
@@ -83,7 +83,7 @@
#define CONFIG_NFS_TIMEOUT 10000UL
/* I2C */
-#define CONFIG_SYS_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 ca96683a3a6..8c2c8e110d8 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -47,7 +47,7 @@
/*
* I2C Configuration
*/
-#define CONFIG_SYS_I2C
+#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 6f55acc7db1..670b55de26b 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -56,7 +56,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 cc227c3b4b1..7f4523870e4 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -99,7 +99,7 @@
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 7f658452835..598f6c67a1b 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -331,7 +331,7 @@ unsigned long get_board_ddr_clk(void);
* I2C
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 f76d5a1bd75..58c2d97a327 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -105,7 +105,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 d6783db2c25..ba308c514b9 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -209,7 +209,7 @@
* I2C
*/
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 5900b8f0e30..cbcf30e9686 100644
--- a/include/configs/ls1028a_common.h
+++ b/include/configs/ls1028a_common.h
@@ -45,7 +45,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
/* Serial Port */
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 65d63e2fc99..834c3e6780a 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -150,7 +150,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 6d927b1ec06..f49766b36d3 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -134,7 +134,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 d574e7e592c..3f0679cf05a 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -62,7 +62,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 2ed6584073c..45273364cf3 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -75,7 +75,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
/* Serial Port */
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 52c95de5231..bd117daf063 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -88,7 +88,7 @@
* I2C
*/
#ifdef CONFIG_CMD_I2C
-#define CONFIG_SYS_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 0c2185c529f..c456921ea19 100644
--- a/include/configs/maxbcm.h
+++ b/include/configs/maxbcm.h
@@ -18,7 +18,7 @@
#define CONFIG_SYS_TCLK 250000000 /* 250MHz */
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_SYS_I2C_SLAVE 0x0
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index e5dc9ac1d9e..e69130d5208 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -36,7 +36,7 @@
#define CONFIG_MXC_USB_FLAGS 0
/* I2C Configs */
-#define CONFIG_SYS_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/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index 11896777182..626dbd55d79 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -51,7 +51,7 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* I2C Configs */
-#define CONFIG_SYS_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/mx6sabresd.h b/include/configs/mx6sabresd.h
index e8f52cee202..9546887182b 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -38,7 +38,7 @@
#endif
/* I2C Configs */
-#define CONFIG_SYS_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/nitrogen6x.h b/include/configs/nitrogen6x.h
index 6448ea891f8..0c407503517 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -21,7 +21,7 @@
#define CONFIG_MXC_UART_BASE UART2_BASE
/* I2C Configs */
-#define CONFIG_SYS_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/novena.h b/include/configs/novena.h
index 2b0a7631c8c..3876412ee6e 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -52,7 +52,7 @@
#endif
/* I2C */
-#define CONFIG_SYS_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 066311a97e4..ba5b649b971 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -464,7 +464,7 @@
/* I2C */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_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 04900498507..e4e25ff32a4 100644
--- a/include/configs/phycore_imx8mp.h
+++ b/include/configs/phycore_imx8mp.h
@@ -33,7 +33,7 @@
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 80de1158ad1..f5d2c23400d 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -126,7 +126,7 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* I2C configs */
-#define CONFIG_SYS_I2C
+#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 97cb60c91d2..e4a4a3f291a 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -40,7 +40,7 @@
#undef CONFIG_DM_MMC
#undef CONFIG_DM_PMIC
-#define CONFIG_SYS_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/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index f96dd774b17..abd5e2bacfd 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -74,7 +74,7 @@
/* I2C Configuration */
#define CONFIG_I2C
-#define CONFIG_SYS_I2C
+#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 34a0041617e..529976efee0 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -73,7 +73,7 @@
#endif
/* I2C - Bit-bashed */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
#define CONFIG_SYS_I2C_SOFT_SPEED 100000
#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 4747e74b681..6ef96df0c0e 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -53,7 +53,7 @@
* I2C
*/
-#define CONFIG_SYS_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 9e37e996847..958b850da4a 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -199,7 +199,7 @@
defined CONFIG_I2C4_ENABLE || defined CONFIG_R_I2C_ENABLE
#define CONFIG_SYS_I2C_MVTWSI
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_SPEED 400000
#define CONFIG_SYS_I2C_SLAVE 0x7f
#endif
diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h
index a5cbb112f38..b62ddc7075b 100644
--- a/include/configs/t4qds.h
+++ b/include/configs/t4qds.h
@@ -116,7 +116,7 @@
#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_FSL
#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
#define CONFIG_SYS_FSL_I2C_OFFSET 0x118000
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index afc9adbe127..41efb64752b 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -56,7 +56,7 @@
/* EHCI */
#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 25
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* base address */
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */
#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index 587b134a1b3..70dd15115bf 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -24,7 +24,7 @@
*/
/* I2C */
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_MVTWSI
#define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE
#define CONFIG_I2C_MVTWSI_BASE1 MVEBU_TWSI1_BASE
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index f13e9e52641..fe4689cf1da 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -89,7 +89,7 @@
/* If DM_I2C, enable non-DM I2C support */
#if !CONFIG_IS_ENABLED(DM_I2C)
#define CONFIG_I2C
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#endif
/*
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 1e316227aaa..c6ff44b899f 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -124,7 +124,7 @@
#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
+#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 4c4a1a0ee6d..aa98a51d961 100644
--- a/include/configs/tqma6_wru4.h
+++ b/include/configs/tqma6_wru4.h
@@ -30,6 +30,6 @@
#define CONFIG_SYS_BOOTCOUNT_BE
/* I2C */
-#define CONFIG_SYS_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 b6f75c9262f..813e743bb8d 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -71,7 +71,7 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* I2C configs */
-#define CONFIG_SYS_I2C
+#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 27053c067fc..648232bad33 100644
--- a/include/configs/usbarmory.h
+++ b/include/configs/usbarmory.h
@@ -32,7 +32,7 @@
#define CONFIG_MXC_USB_FLAGS 0
/* I2C */
-#define CONFIG_SYS_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 fd4c749d96b..4f11018e6d3 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -42,7 +42,7 @@
#define CONFIG_FEC_MXC_PHYADDR 0
/* I2C Configs */
-#define CONFIG_SYS_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/vining_2000.h b/include/configs/vining_2000.h
index f97431f1354..e90eaf32038 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -43,7 +43,7 @@
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
/* I2C Configs */
-#define CONFIG_SYS_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_I2C3 /* enable I2C bus 3 */
diff --git a/include/configs/warp.h b/include/configs/warp.h
index bda8ff9a34f..e3beee0447b 100644
--- a/include/configs/warp.h
+++ b/include/configs/warp.h
@@ -53,7 +53,7 @@
#define DFU_DEFAULT_POLL_TIMEOUT 300
/* I2C Configs */
-#define CONFIG_SYS_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/work_92105.h b/include/configs/work_92105.h
index d498c8f3bc6..f96178bce99 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -47,7 +47,7 @@
* I2C driver
*/
-#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_SPEED 350000
/*
diff --git a/include/configs/xpress.h b/include/configs/xpress.h
index e7a26589d67..e4678e31dc9 100644
--- a/include/configs/xpress.h
+++ b/include/configs/xpress.h
@@ -22,7 +22,7 @@
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
/* I2C configs */
-#define CONFIG_SYS_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/i2c.h b/include/i2c.h
index c0fe94c1f33..8db34a67fee 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -20,7 +20,7 @@
/*
* For now there are essentially two parts to this file - driver model
- * here at the top, and the older code below (with CONFIG_SYS_I2C being
+ * here at the top, and the older code below (with CONFIG_SYS_I2C_LEGACY being
* most recent). The plan is to migrate everything to driver model.
* The driver model structures and API are separate as they are different
* enough as to be incompatible for compilation purposes.
@@ -748,7 +748,7 @@ void i2c_early_init_f(void);
void i2c_init(int speed, int slaveaddr);
void i2c_init_board(void);
-#ifdef CONFIG_SYS_I2C
+#ifdef CONFIG_SYS_I2C_LEGACY
/*
* i2c_get_bus_num:
*
@@ -922,13 +922,13 @@ int i2c_set_bus_speed(unsigned int);
*/
unsigned int i2c_get_bus_speed(void);
-#endif /* CONFIG_SYS_I2C */
+#endif /* CONFIG_SYS_I2C_LEGACY */
/*
* only for backwardcompatibility, should go away if we switched
* completely to new multibus support.
*/
-#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS)
+#if defined(CONFIG_SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS)
# if !defined(CONFIG_SYS_MAX_I2C_BUS)
# define CONFIG_SYS_MAX_I2C_BUS 2
# endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 042ca116e99..b7c235a9895 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2313,7 +2313,6 @@ CONFIG_SYS_HMI_BASE
CONFIG_SYS_HRCW_HIGH
CONFIG_SYS_HRCW_LOW
CONFIG_SYS_HZ_CLOCK
-CONFIG_SYS_I2C
CONFIG_SYS_I2C2_FSL_OFFSET
CONFIG_SYS_I2C2_OFFSET
CONFIG_SYS_I2C2_PINMUX_CLR
@@ -2368,6 +2367,7 @@ CONFIG_SYS_I2C_IHS_SPEED_3
CONFIG_SYS_I2C_IHS_SPEED_3_1
CONFIG_SYS_I2C_INIT_BOARD
CONFIG_SYS_I2C_LDI_ADDR
+CONFIG_SYS_I2C_LEGACY
CONFIG_SYS_I2C_LPC32XX_SLAVE
CONFIG_SYS_I2C_LPC32XX_SPEED
CONFIG_SYS_I2C_MAC1_BUS
--
2.32.0.93.g670b81a890-goog
More information about the U-Boot
mailing list