summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-12-05 21:04:24 -0500
committerTom Rini <[email protected]>2022-12-05 21:04:24 -0500
commitd2ad92927ea91ab8cece92a308350602c594dd3e (patch)
tree23ec41dc6f0aff10b800c69396a32ac5ac926817 /cmd
parent1c470f32f74248ff4aa145bf033fb6524dc7fc2e (diff)
parent7102d324f6b41741ee74587d43d77b302b1bbd96 (diff)
Merge branch '2022-12-05-Kconfig-migrations-and-renames' into next
- First batch of the patches that end up with scripts/config_whitelist.tx being empty. Mostly migrations and a little bit of code removal and CFG renaming.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/date.c4
-rw-r--r--cmd/i2c.c22
-rw-r--r--cmd/ti/ddr3.c18
3 files changed, 22 insertions, 22 deletions
diff --git a/cmd/date.c b/cmd/date.c
index 0e2dfbc4fc2..58505e6e1d3 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -51,10 +51,10 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
}
#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
old_bus = i2c_get_bus_num();
- i2c_set_bus_num(CONFIG_SYS_RTC_BUS_NUM);
+ i2c_set_bus_num(CFG_SYS_RTC_BUS_NUM);
#else
old_bus = I2C_GET_BUS();
- I2C_SET_BUS(CONFIG_SYS_RTC_BUS_NUM);
+ I2C_SET_BUS(CFG_SYS_RTC_BUS_NUM);
#endif
switch (argc) {
diff --git a/cmd/i2c.c b/cmd/i2c.c
index e196a73efa6..da8b4c25555 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -97,19 +97,19 @@ static uint i2c_mm_last_alen;
* When multiple buses are present, the list is an array of bus-address
* pairs. The following macros take care of this */
-#if defined(CONFIG_SYS_I2C_NOPROBES)
+#if defined(CFG_SYS_I2C_NOPROBES)
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || defined(CONFIG_I2C_MULTI_BUS)
static struct
{
uchar bus;
uchar addr;
-} i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES;
+} i2c_no_probes[] = CFG_SYS_I2C_NOPROBES;
#define GET_BUS_NUM i2c_get_bus_num()
#define COMPARE_BUS(b,i) (i2c_no_probes[(i)].bus == (b))
#define COMPARE_ADDR(a,i) (i2c_no_probes[(i)].addr == (a))
#define NO_PROBE_ADDR(i) i2c_no_probes[(i)].addr
#else /* single bus */
-static uchar i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES;
+static uchar i2c_no_probes[] = CFG_SYS_I2C_NOPROBES;
#define GET_BUS_NUM 0
#define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */
#define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a))
@@ -912,7 +912,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
int j;
int addr = -1;
int found = 0;
-#if defined(CONFIG_SYS_I2C_NOPROBES)
+#if defined(CFG_SYS_I2C_NOPROBES)
int k, skip;
unsigned int bus = GET_BUS_NUM;
#endif /* NOPROBES */
@@ -932,7 +932,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
if ((0 <= addr) && (j != addr))
continue;
-#if defined(CONFIG_SYS_I2C_NOPROBES)
+#if defined(CFG_SYS_I2C_NOPROBES)
skip = 0;
for (k = 0; k < ARRAY_SIZE(i2c_no_probes); k++) {
if (COMPARE_BUS(bus, k) && COMPARE_ADDR(j, k)) {
@@ -955,7 +955,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
}
putc ('\n');
-#if defined(CONFIG_SYS_I2C_NOPROBES)
+#if defined(CFG_SYS_I2C_NOPROBES)
puts ("Excluded chip addresses:");
for (k = 0; k < ARRAY_SIZE(i2c_no_probes); k++) {
if (COMPARE_BUS(bus,k))
@@ -1697,12 +1697,12 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
#else
int i;
- for (i = 0; i < CONFIG_SYS_NUM_I2C_BUSES; i++) {
+ for (i = 0; i < CFG_SYS_NUM_I2C_BUSES; i++) {
printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
int j;
- for (j = 0; j < CONFIG_SYS_I2C_MAX_HOPS; j++) {
+ for (j = 0; j < CFG_SYS_I2C_MAX_HOPS; j++) {
if (i2c_bus[i].next_hop[j].chip == 0)
break;
printf("->%s@0x%2x:%d",
@@ -1730,14 +1730,14 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
}
show_bus(bus);
#else
- if (i >= CONFIG_SYS_NUM_I2C_BUSES) {
+ if (i >= CFG_SYS_NUM_I2C_BUSES) {
printf("Invalid bus %d\n", i);
return -1;
}
printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
int j;
- for (j = 0; j < CONFIG_SYS_I2C_MAX_HOPS; j++) {
+ for (j = 0; j < CFG_SYS_I2C_MAX_HOPS; j++) {
if (i2c_bus[i].next_hop[j].chip == 0)
break;
printf("->%s@0x%2x:%d",
@@ -1788,7 +1788,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
} else {
bus_no = dectoul(argv[1], NULL);
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
- if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES) {
+ if (bus_no >= CFG_SYS_NUM_I2C_BUSES) {
printf("Invalid bus %d\n", bus_no);
return -1;
}
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index aaaedfe9735..bbd406fc66e 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_ARCH_KEYSTONE
#include <asm/arch/ddr3.h>
-#define DDR_MIN_ADDR CONFIG_SYS_SDRAM_BASE
+#define DDR_MIN_ADDR CFG_SYS_SDRAM_BASE
#define STACKSIZE (512 << 10) /* 512 KiB */
#define DDR_REMAP_ADDR 0x80000000
@@ -247,9 +247,9 @@ static int is_addr_valid(u32 addr)
/* Check in ecc address range 1 */
if (ecc_ctrl & EMIF_ECC_REG_ECC_ADDR_RGN_1_EN_MASK) {
start_addr = ((range & EMIF_ECC_REG_ECC_START_ADDR_MASK) << 16)
- + CONFIG_SYS_SDRAM_BASE;
+ + CFG_SYS_SDRAM_BASE;
end_addr = (range & EMIF_ECC_REG_ECC_END_ADDR_MASK) + 0xFFFF +
- CONFIG_SYS_SDRAM_BASE;
+ CFG_SYS_SDRAM_BASE;
if ((addr >= start_addr) && (addr <= end_addr))
/* addr within ecc address range 1 */
return 1;
@@ -259,9 +259,9 @@ static int is_addr_valid(u32 addr)
if (ecc_ctrl & EMIF_ECC_REG_ECC_ADDR_RGN_2_EN_MASK) {
range = readl(&emif->emif_ecc_address_range_2);
start_addr = ((range & EMIF_ECC_REG_ECC_START_ADDR_MASK) << 16)
- + CONFIG_SYS_SDRAM_BASE;
+ + CFG_SYS_SDRAM_BASE;
end_addr = (range & EMIF_ECC_REG_ECC_END_ADDR_MASK) + 0xFFFF +
- CONFIG_SYS_SDRAM_BASE;
+ CFG_SYS_SDRAM_BASE;
if ((addr >= start_addr) && (addr <= end_addr))
/* addr within ecc address range 2 */
return 1;
@@ -309,11 +309,11 @@ static int do_ddr_test(struct cmd_tbl *cmdtp,
start_addr = hextoul(argv[2], NULL);
end_addr = hextoul(argv[3], NULL);
- if ((start_addr < CONFIG_SYS_SDRAM_BASE) ||
- (start_addr > (CONFIG_SYS_SDRAM_BASE +
+ if ((start_addr < CFG_SYS_SDRAM_BASE) ||
+ (start_addr > (CFG_SYS_SDRAM_BASE +
get_effective_memsize() - 1)) ||
- (end_addr < CONFIG_SYS_SDRAM_BASE) ||
- (end_addr > (CONFIG_SYS_SDRAM_BASE +
+ (end_addr < CFG_SYS_SDRAM_BASE) ||
+ (end_addr > (CFG_SYS_SDRAM_BASE +
get_effective_memsize() - 1)) || (start_addr >= end_addr)) {
puts("Invalid start or end address!\n");
return cmd_usage(cmdtp);