From: Simon Glass Date: Sun, 11 Aug 2024 14:50:37 +0000 (-0600) Subject: rtc: Drop CFG_SYS_RTC_BUS_NUM X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=9baa31ab092c90d5c5149e02a2edb7073df7bccf;p=u-boot.git rtc: Drop CFG_SYS_RTC_BUS_NUM This option is very old and the migration deadline was years ago. Drop it so that the I2C system can be simplified. Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher --- diff --git a/README b/README index c3821c5ce4..37c959cc9c 100644 --- a/README +++ b/README @@ -893,11 +893,6 @@ The following options need to be configured: will skip addresses 0x50 and 0x68 on a board with one I2C bus - CFG_SYS_RTC_BUS_NUM - - If defined, then this indicates the I2C bus number for the RTC. - If not defined, then U-Boot assumes that RTC is on I2C bus 0. - CONFIG_SOFT_I2C_READ_REPEATED_START defining this will force the i2c_read() function in diff --git a/cmd/date.c b/cmd/date.c index 755adec1e7..bdb3e199b4 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -42,12 +42,6 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } } -#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY) - old_bus = i2c_get_bus_num(); - i2c_set_bus_num(CFG_SYS_RTC_BUS_NUM); -#else - old_bus = I2C_GET_BUS(); - I2C_SET_BUS(CFG_SYS_RTC_BUS_NUM); #endif switch (argc) { diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h index 769ece901c..ed93b51d80 100644 --- a/include/configs/ls1028aqds.h +++ b/include/configs/ls1028aqds.h @@ -47,7 +47,6 @@ #endif /* RTC */ -#define CFG_SYS_RTC_BUS_NUM 1 #define I2C_MUX_CH_RTC 0xB /* Store environment at top of flash */ diff --git a/include/configs/ls1028ardb.h b/include/configs/ls1028ardb.h index 0f591e3c4a..d44ce45fd6 100644 --- a/include/configs/ls1028ardb.h +++ b/include/configs/ls1028ardb.h @@ -10,8 +10,6 @@ #define COUNTER_FREQUENCY_REAL (get_board_sys_clk() / 4) -#define CFG_SYS_RTC_BUS_NUM 0 - /* Store environment at top of flash */ /* diff --git a/include/configs/ls1046afrwy.h b/include/configs/ls1046afrwy.h index 5e03a962d1..21804fc665 100644 --- a/include/configs/ls1046afrwy.h +++ b/include/configs/ls1046afrwy.h @@ -66,7 +66,6 @@ /* RTC */ #define CFG_SYS_I2C_RTC_ADDR 0x51 /* Channel 0 I2C bus 0*/ -#define CFG_SYS_RTC_BUS_NUM 0 /* * Environment diff --git a/include/configs/lx2160aqds.h b/include/configs/lx2160aqds.h index 3a316e7330..5b397e23d8 100644 --- a/include/configs/lx2160aqds.h +++ b/include/configs/lx2160aqds.h @@ -8,9 +8,6 @@ #include "lx2160a_common.h" -/* RTC */ -#define CFG_SYS_RTC_BUS_NUM 0 - /* MAC/PHY configuration */ /* Initial environment variables */ diff --git a/include/configs/lx2160ardb.h b/include/configs/lx2160ardb.h index 6404b35911..e700a7b113 100644 --- a/include/configs/lx2160ardb.h +++ b/include/configs/lx2160ardb.h @@ -8,9 +8,6 @@ #include "lx2160a_common.h" -/* RTC */ -#define CFG_SYS_RTC_BUS_NUM 4 - #if defined(CONFIG_FSL_MC_ENET) #define AQR113C_PHY_ADDR1 0x0 #define AQR113C_PHY_ADDR2 0x08 diff --git a/include/configs/lx2162aqds.h b/include/configs/lx2162aqds.h index 54d7cea4c5..2d0db47b33 100644 --- a/include/configs/lx2162aqds.h +++ b/include/configs/lx2162aqds.h @@ -10,9 +10,6 @@ /* USB */ -/* RTC */ -#define CFG_SYS_RTC_BUS_NUM 0 - /* Initial environment variables */ #define CFG_EXTRA_ENV_SETTINGS \ EXTRA_ENV_SETTINGS \ diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 9cf46b2c36..c245cbe427 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -57,8 +57,6 @@ #define CFG_FEC_MXC_PHYADDR 0x0 #endif -#define CFG_SYS_RTC_BUS_NUM 1 /* I2C2 */ - /* * RTC */ diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h index e06fc7fe15..5e21463305 100644 --- a/include/configs/tqma6_wru4.h +++ b/include/configs/tqma6_wru4.h @@ -16,7 +16,6 @@ /* Watchdog */ /* Config on-board RTC */ -#define CFG_SYS_RTC_BUS_NUM 2 #define CFG_SYS_I2C_RTC_ADDR 0x68 /* Turn off RTC square-wave output to save battery */ diff --git a/include/i2c.h b/include/i2c.h index 622540c826..45ca3d63e3 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -655,11 +655,6 @@ void i2c_early_init_f(void); #undef CFG_SYS_I2C_DIRECT_BUS #endif -/* define the I2C bus number for RTC and DTT if not already done */ -#if !defined(CFG_SYS_RTC_BUS_NUM) -#define CFG_SYS_RTC_BUS_NUM 0 -#endif - struct i2c_adapter { void (*init)(struct i2c_adapter *adap, int speed, int slaveaddr);