aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-16 13:10:29 -0500
committerTom Rini <trini@konsulko.com>2022-12-05 16:06:07 -0500
commitcdc5ed8f1f2add27105151ecf61a07c5d4c3684a (patch)
treeeb28b38eabb5413880ef5fb6ec73cce286aa29e8 /drivers
parent91092132bac0ae768beb76c12ef8be732ea6ba3a (diff)
downloadu-boot-cdc5ed8f1f2add27105151ecf61a07c5d4c3684a.zip
u-boot-cdc5ed8f1f2add27105151ecf61a07c5d4c3684a.tar.gz
u-boot-cdc5ed8f1f2add27105151ecf61a07c5d4c3684a.tar.bz2
global: Move remaining CONFIG_SYS_NUM_* to CFG_SYS_NUM_*
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NUM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c_core.c6
-rw-r--r--drivers/misc/fsl_portals.c2
-rw-r--r--drivers/net/fm/fm.c2
-rw-r--r--drivers/net/fm/fm.h4
-rw-r--r--drivers/net/fm/init.c48
5 files changed, 31 insertions, 31 deletions
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 09f91e6..c3f6a12 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -34,7 +34,7 @@ struct i2c_adapter *i2c_get_adapter(int index)
}
#if !defined(CONFIG_SYS_I2C_DIRECT_BUS)
-struct i2c_bus_hose i2c_bus[CONFIG_SYS_NUM_I2C_BUSES] =
+struct i2c_bus_hose i2c_bus[CFG_SYS_NUM_I2C_BUSES] =
CONFIG_SYS_I2C_BUSES;
#endif
@@ -173,7 +173,7 @@ static int i2c_mux_disconnect_all(void)
*/
static void i2c_init_bus(unsigned int bus_no, int speed, int slaveaddr)
{
- if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES)
+ if (bus_no >= CFG_SYS_NUM_I2C_BUSES)
return;
I2C_ADAP->init(I2C_ADAP, speed, slaveaddr);
@@ -238,7 +238,7 @@ int i2c_set_bus_num(unsigned int bus)
return 0;
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
- if (bus >= CONFIG_SYS_NUM_I2C_BUSES)
+ if (bus >= CFG_SYS_NUM_I2C_BUSES)
return -1;
#endif
diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
index 30a9409..9c4b4d7 100644
--- a/drivers/misc/fsl_portals.c
+++ b/drivers/misc/fsl_portals.c
@@ -257,7 +257,7 @@ defined(CONFIG_ARCH_LS1046A)
#endif
#ifdef CONFIG_SYS_DPAA_FMAN
- for (j = 0; j < CONFIG_SYS_NUM_FMAN; j++) {
+ for (j = 0; j < CFG_SYS_NUM_FMAN; j++) {
char name[] = "fman@0";
name[sizeof(name) - 2] = '0' + j;
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 9b6dbe2..1d3b7aa 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -26,7 +26,7 @@
#include <asm/arch/cpu.h>
#endif
-struct fm_muram muram[CONFIG_SYS_NUM_FMAN];
+struct fm_muram muram[CFG_SYS_NUM_FMAN];
void *fm_muram_base(int fm_idx)
{
diff --git a/drivers/net/fm/fm.h b/drivers/net/fm/fm.h
index 2379b3a..3d9cc5c 100644
--- a/drivers/net/fm/fm.h
+++ b/drivers/net/fm/fm.h
@@ -15,11 +15,11 @@
#define OH_PORT_ID_BASE 0x01
#define MAX_NUM_OH_PORT 7
#define RX_PORT_1G_BASE 0x08
-#define MAX_NUM_RX_PORT_1G CONFIG_SYS_NUM_FM1_DTSEC
+#define MAX_NUM_RX_PORT_1G CFG_SYS_NUM_FM1_DTSEC
#define RX_PORT_10G_BASE 0x10
#define RX_PORT_10G_BASE2 0x08
#define TX_PORT_1G_BASE 0x28
-#define MAX_NUM_TX_PORT_1G CONFIG_SYS_NUM_FM1_DTSEC
+#define MAX_NUM_TX_PORT_1G CFG_SYS_NUM_FM1_DTSEC
#define TX_PORT_10G_BASE 0x30
#define TX_PORT_10G_BASE2 0x28
#define MIIM_TIMEOUT 0xFFFF
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 34f3816..8443cbb 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -19,70 +19,70 @@
#ifndef CONFIG_DM_ETH
struct fm_eth_info fm_info[] = {
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 1)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 1)
FM_DTSEC_INFO_INITIALIZER(1, 1),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 2)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 2)
FM_DTSEC_INFO_INITIALIZER(1, 2),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 3)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 3)
FM_DTSEC_INFO_INITIALIZER(1, 3),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 4)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 4)
FM_DTSEC_INFO_INITIALIZER(1, 4),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 5)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 5)
FM_DTSEC_INFO_INITIALIZER(1, 5),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 6)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 6)
FM_DTSEC_INFO_INITIALIZER(1, 6),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 7)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 7)
FM_DTSEC_INFO_INITIALIZER(1, 9),
#endif
-#if (CONFIG_SYS_NUM_FM1_DTSEC >= 8)
+#if (CFG_SYS_NUM_FM1_DTSEC >= 8)
FM_DTSEC_INFO_INITIALIZER(1, 10),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 1)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 1)
FM_DTSEC_INFO_INITIALIZER(2, 1),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 2)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 2)
FM_DTSEC_INFO_INITIALIZER(2, 2),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 3)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 3)
FM_DTSEC_INFO_INITIALIZER(2, 3),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 4)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 4)
FM_DTSEC_INFO_INITIALIZER(2, 4),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 5)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 5)
FM_DTSEC_INFO_INITIALIZER(2, 5),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 6)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 6)
FM_DTSEC_INFO_INITIALIZER(2, 6),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 7)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 7)
FM_DTSEC_INFO_INITIALIZER(2, 9),
#endif
-#if (CONFIG_SYS_NUM_FM2_DTSEC >= 8)
+#if (CFG_SYS_NUM_FM2_DTSEC >= 8)
FM_DTSEC_INFO_INITIALIZER(2, 10),
#endif
-#if (CONFIG_SYS_NUM_FM1_10GEC >= 1)
+#if (CFG_SYS_NUM_FM1_10GEC >= 1)
FM_TGEC_INFO_INITIALIZER(1, 1),
#endif
-#if (CONFIG_SYS_NUM_FM1_10GEC >= 2)
+#if (CFG_SYS_NUM_FM1_10GEC >= 2)
FM_TGEC_INFO_INITIALIZER(1, 2),
#endif
-#if (CONFIG_SYS_NUM_FM1_10GEC >= 3)
+#if (CFG_SYS_NUM_FM1_10GEC >= 3)
FM_TGEC_INFO_INITIALIZER2(1, 3),
#endif
-#if (CONFIG_SYS_NUM_FM1_10GEC >= 4)
+#if (CFG_SYS_NUM_FM1_10GEC >= 4)
FM_TGEC_INFO_INITIALIZER2(1, 4),
#endif
-#if (CONFIG_SYS_NUM_FM2_10GEC >= 1)
+#if (CFG_SYS_NUM_FM2_10GEC >= 1)
FM_TGEC_INFO_INITIALIZER(2, 1),
#endif
-#if (CONFIG_SYS_NUM_FM2_10GEC >= 2)
+#if (CFG_SYS_NUM_FM2_10GEC >= 2)
FM_TGEC_INFO_INITIALIZER(2, 2),
#endif
};
@@ -101,7 +101,7 @@ int fm_standard_init(struct bd_info *bis)
fm_eth_initialize(reg, &fm_info[i]);
}
-#if (CONFIG_SYS_NUM_FMAN == 2)
+#if (CFG_SYS_NUM_FMAN == 2)
reg = (void *)CFG_SYS_FSL_FM2_ADDR;
if (fm_init_common(1, reg))
return 0;
@@ -276,7 +276,7 @@ int ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC10))) ||
((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC1))) ||
((info->port == FM1_10GEC4) && (PORT_IS_ENABLED(FM1_DTSEC2)))
-#if (CONFIG_SYS_NUM_FMAN == 2)
+#if (CFG_SYS_NUM_FMAN == 2)
||
((info->port == FM2_DTSEC9) && (PORT_IS_ENABLED(FM2_10GEC1))) ||
((info->port == FM2_DTSEC10) && (PORT_IS_ENABLED(FM2_10GEC2))) ||