summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bdinfo.c12
-rw-r--r--cmd/ti/ddr4.c8
-rw-r--r--cmd/ufetch.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index ddf77303735..bf1eca75904 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -77,15 +77,15 @@ void bdinfo_print_mhz(const char *name, unsigned long hz)
printf("%-12s= %6s MHz\n", name, strmhz(buf, hz));
}
-static void print_bi_dram(const struct bd_info *bd)
+static void print_dram(const struct bd_info *bd)
{
int i;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- if (bd->bi_dram[i].size) {
+ if (gd->dram[i].size) {
bdinfo_print_num_l("DRAM bank", i);
- bdinfo_print_num_ll("-> start", bd->bi_dram[i].start);
- bdinfo_print_num_ll("-> size", bd->bi_dram[i].size);
+ bdinfo_print_num_ll("-> start", gd->dram[i].start);
+ bdinfo_print_num_ll("-> size", gd->dram[i].size);
}
}
}
@@ -144,7 +144,7 @@ static int bdinfo_print_all(struct bd_info *bd)
bdinfo_print_num_l("bd address", (ulong)bd);
#endif
bdinfo_print_num_l("boot_params", (ulong)bd->bi_boot_params);
- print_bi_dram(bd);
+ print_dram(bd);
bdinfo_print_num_l("flashstart", (ulong)bd->bi_flashstart);
bdinfo_print_num_l("flashsize", (ulong)bd->bi_flashsize);
bdinfo_print_num_l("flashoffset", (ulong)bd->bi_flashoffset);
@@ -199,7 +199,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
print_eth();
return CMD_RET_SUCCESS;
case 'm':
- print_bi_dram(bd);
+ print_dram(bd);
return CMD_RET_SUCCESS;
default:
return CMD_RET_USAGE;
diff --git a/cmd/ti/ddr4.c b/cmd/ti/ddr4.c
index a8d71d11a91..36277cc154c 100644
--- a/cmd/ti/ddr4.c
+++ b/cmd/ti/ddr4.c
@@ -227,10 +227,10 @@ static int do_ddr4_ecc_inject(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
- if (!((start_addr >= gd->bd->bi_dram[0].start &&
- (start_addr <= (gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - 1))) ||
- (start_addr >= gd->bd->bi_dram[1].start &&
- (start_addr <= (gd->bd->bi_dram[1].start + gd->bd->bi_dram[1].size - 1))))) {
+ if (!((start_addr >= gd->dram[0].start &&
+ (start_addr <= (gd->dram[0].start + gd->dram[0].size - 1))) ||
+ (start_addr >= gd->dram[1].start &&
+ (start_addr <= (gd->dram[1].start + gd->dram[1].size - 1))))) {
puts("Address is not in the DDR range\n");
return CMD_RET_FAILURE;
}
diff --git a/cmd/ufetch.c b/cmd/ufetch.c
index e7b5d773f5e..763ab42c48a 100644
--- a/cmd/ufetch.c
+++ b/cmd/ufetch.c
@@ -202,8 +202,8 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
printf("CPU: " RESET CONFIG_SYS_ARCH " (%d cores, 1 in use)\n", n_cpus);
break;
case MEMORY:
- for (int j = 0; j < CONFIG_NR_DRAM_BANKS && gd->bd->bi_dram[j].size; j++)
- size += gd->bd->bi_dram[j].size;
+ for (int j = 0; j < CONFIG_NR_DRAM_BANKS && gd->dram[j].size; j++)
+ size += gd->dram[j].size;
printf("Memory:" RESET " ");
print_size(size, "\n");
break;