Blame view
common/cmd_bdinfo.c
14.5 KB
8bde7f776
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
/* * (C) Copyright 2003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ /* * Boot support */ #include <common.h> #include <command.h> |
d88af4da9
|
29 |
#include <linux/compiler.h> |
8bde7f776
|
30 |
|
d87080b72
|
31 |
DECLARE_GLOBAL_DATA_PTR; |
8bde7f776
|
32 |
|
d88af4da9
|
33 34 35 36 37 38 |
__maybe_unused static void print_num(const char *name, ulong value) { printf("%-12s= 0x%08lX ", name, value); } |
8bde7f776
|
39 |
|
5f3dfadc2
|
40 |
__maybe_unused |
d88af4da9
|
41 42 43 44 45 46 47 48 49 50 51 52 53 |
static void print_eth(int idx) { char name[10], *val; if (idx) sprintf(name, "eth%iaddr", idx); else strcpy(name, "ethaddr"); val = getenv(name); if (!val) val = "(not set)"; printf("%-12s= %s ", name, val); } |
de2dff6ff
|
54 |
|
d88af4da9
|
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
__maybe_unused static void print_lnum(const char *name, u64 value) { printf("%-12s= 0x%.8llX ", name, value); } __maybe_unused static void print_mhz(const char *name, unsigned long hz) { char buf[32]; printf("%-12s= %6s MHz ", name, strmhz(buf, hz)); } |
8bde7f776
|
70 |
|
c99ea7907
|
71 |
#if defined(CONFIG_PPC) |
8bde7f776
|
72 |
|
5902e8f71
|
73 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
8bde7f776
|
74 |
{ |
8bde7f776
|
75 |
bd_t *bd = gd->bd; |
8bde7f776
|
76 77 |
#ifdef DEBUG |
5902e8f71
|
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
print_num("bd address", (ulong)bd); #endif print_num("memstart", bd->bi_memstart); print_lnum("memsize", bd->bi_memsize); print_num("flashstart", bd->bi_flashstart); print_num("flashsize", bd->bi_flashsize); print_num("flashoffset", bd->bi_flashoffset); print_num("sramstart", bd->bi_sramstart); print_num("sramsize", bd->bi_sramsize); #if defined(CONFIG_5xx) || defined(CONFIG_8xx) || \ defined(CONFIG_8260) || defined(CONFIG_E500) print_num("immr_base", bd->bi_immr_base); #endif print_num("bootflags", bd->bi_bootflags); #if defined(CONFIG_405CR) || defined(CONFIG_405EP) || \ defined(CONFIG_405GP) || \ defined(CONFIG_440EP) || defined(CONFIG_440EPX) || \ defined(CONFIG_440GR) || defined(CONFIG_440GRX) || \ defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \ defined(CONFIG_XILINX_405) |
0c277ef9f
|
98 99 |
print_mhz("procfreq", bd->bi_procfreq); print_mhz("plb_busfreq", bd->bi_plb_busfreq); |
5902e8f71
|
100 101 102 103 |
#if defined(CONFIG_405EP) || defined(CONFIG_405GP) || \ defined(CONFIG_440EP) || defined(CONFIG_440EPX) || \ defined(CONFIG_440GR) || defined(CONFIG_440GRX) || \ defined(CONFIG_440SPE) || defined(CONFIG_XILINX_405) |
0c277ef9f
|
104 |
print_mhz("pci_busfreq", bd->bi_pci_busfreq); |
8bde7f776
|
105 |
#endif |
9fea65a6c
|
106 |
#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_405, CONFIG_440EP CONFIG_440GR */ |
9c4c5ae3e
|
107 |
#if defined(CONFIG_CPM2) |
0c277ef9f
|
108 109 110 |
print_mhz("vco", bd->bi_vco); print_mhz("sccfreq", bd->bi_sccfreq); print_mhz("brgfreq", bd->bi_brgfreq); |
8bde7f776
|
111 |
#endif |
0c277ef9f
|
112 |
print_mhz("intfreq", bd->bi_intfreq); |
9c4c5ae3e
|
113 |
#if defined(CONFIG_CPM2) |
0c277ef9f
|
114 |
print_mhz("cpmfreq", bd->bi_cpmfreq); |
8bde7f776
|
115 |
#endif |
0c277ef9f
|
116 |
print_mhz("busfreq", bd->bi_busfreq); |
9fea65a6c
|
117 |
#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_405, CONFIG_440EP CONFIG_440GR */ |
983fda839
|
118 |
#if defined(CONFIG_MPC8220) |
0c277ef9f
|
119 120 121 122 123 |
print_mhz("inpfreq", bd->bi_inpfreq); print_mhz("flbfreq", bd->bi_flbfreq); print_mhz("pcifreq", bd->bi_pcifreq); print_mhz("vcofreq", bd->bi_vcofreq); print_mhz("pevfreq", bd->bi_pevfreq); |
983fda839
|
124 |
#endif |
03f5c5502
|
125 |
|
34e210f5b
|
126 127 128 129 130 131 132 133 134 |
#ifdef CONFIG_ENABLE_36BIT_PHYS #ifdef CONFIG_PHYS_64BIT puts("addressing = 36-bit "); #else puts("addressing = 32-bit "); #endif #endif |
de2dff6ff
|
135 |
print_eth(0); |
e2ffd59b4
|
136 |
#if defined(CONFIG_HAS_ETH1) |
de2dff6ff
|
137 |
print_eth(1); |
03f5c5502
|
138 |
#endif |
e2ffd59b4
|
139 |
#if defined(CONFIG_HAS_ETH2) |
de2dff6ff
|
140 |
print_eth(2); |
42d1f0394
|
141 |
#endif |
e2ffd59b4
|
142 |
#if defined(CONFIG_HAS_ETH3) |
de2dff6ff
|
143 |
print_eth(3); |
03f5c5502
|
144 |
#endif |
c68a05fee
|
145 |
#if defined(CONFIG_HAS_ETH4) |
de2dff6ff
|
146 |
print_eth(4); |
c68a05fee
|
147 |
#endif |
c68a05fee
|
148 |
#if defined(CONFIG_HAS_ETH5) |
de2dff6ff
|
149 |
print_eth(5); |
c68a05fee
|
150 |
#endif |
8bde7f776
|
151 |
#ifdef CONFIG_HERMES |
0c277ef9f
|
152 |
print_mhz("ethspeed", bd->bi_ethspeed); |
8bde7f776
|
153 |
#endif |
50a47d052
|
154 155 |
printf("IP addr = %s ", getenv("ipaddr")); |
5902e8f71
|
156 157 158 |
printf("baudrate = %6ld bps ", bd->bi_baudrate); print_num("relocaddr", gd->relocaddr); |
8bde7f776
|
159 160 |
return 0; } |
c99ea7907
|
161 |
#elif defined(CONFIG_NIOS2) |
5c952cf02
|
162 |
|
5902e8f71
|
163 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
5c952cf02
|
164 |
{ |
5c952cf02
|
165 |
bd_t *bd = gd->bd; |
5902e8f71
|
166 167 168 169 170 |
print_num("mem start", (ulong)bd->bi_memstart); print_lnum("mem size", (u64)bd->bi_memsize); print_num("flash start", (ulong)bd->bi_flashstart); print_num("flash size", (ulong)bd->bi_flashsize); print_num("flash offset", (ulong)bd->bi_flashoffset); |
5c952cf02
|
171 |
|
6d0f6bcf3
|
172 |
#if defined(CONFIG_SYS_SRAM_BASE) |
5c952cf02
|
173 174 175 |
print_num ("sram start", (ulong)bd->bi_sramstart); print_num ("sram size", (ulong)bd->bi_sramsize); #endif |
902531788
|
176 |
#if defined(CONFIG_CMD_NET) |
de2dff6ff
|
177 |
print_eth(0); |
50a47d052
|
178 179 |
printf("ip_addr = %s ", getenv("ipaddr")); |
5c952cf02
|
180 |
#endif |
5902e8f71
|
181 182 |
printf("baudrate = %ld bps ", bd->bi_baudrate); |
5c952cf02
|
183 184 185 |
return 0; } |
c99ea7907
|
186 187 |
#elif defined(CONFIG_MICROBLAZE) |
cfc67116a
|
188 |
|
5902e8f71
|
189 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
cfc67116a
|
190 |
{ |
cfc67116a
|
191 |
bd_t *bd = gd->bd; |
5902e8f71
|
192 193 194 195 196 |
print_num("mem start ", (ulong)bd->bi_memstart); print_lnum("mem size ", (u64)bd->bi_memsize); print_num("flash start ", (ulong)bd->bi_flashstart); print_num("flash size ", (ulong)bd->bi_flashsize); print_num("flash offset ", (ulong)bd->bi_flashoffset); |
6d0f6bcf3
|
197 |
#if defined(CONFIG_SYS_SRAM_BASE) |
5902e8f71
|
198 199 |
print_num("sram start ", (ulong)bd->bi_sramstart); print_num("sram size ", (ulong)bd->bi_sramsize); |
cfc67116a
|
200 |
#endif |
902531788
|
201 |
#if defined(CONFIG_CMD_NET) |
de2dff6ff
|
202 |
print_eth(0); |
50a47d052
|
203 204 |
printf("ip_addr = %s ", getenv("ipaddr")); |
cfc67116a
|
205 |
#endif |
5902e8f71
|
206 207 |
printf("baudrate = %ld bps ", (ulong)bd->bi_baudrate); |
cfc67116a
|
208 209 |
return 0; } |
4a5517094
|
210 |
|
c99ea7907
|
211 |
#elif defined(CONFIG_SPARC) |
54841ab50
|
212 |
int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
00ab32c85
|
213 214 |
{ bd_t *bd = gd->bd; |
00ab32c85
|
215 216 217 218 219 |
#ifdef DEBUG print_num("bd address ", (ulong) bd); #endif print_num("memstart ", bd->bi_memstart); |
b57ca3e12
|
220 |
print_lnum("memsize ", bd->bi_memsize); |
00ab32c85
|
221 |
print_num("flashstart ", bd->bi_flashstart); |
6d0f6bcf3
|
222 |
print_num("CONFIG_SYS_MONITOR_BASE ", CONFIG_SYS_MONITOR_BASE); |
0e8d15866
|
223 |
print_num("CONFIG_ENV_ADDR ", CONFIG_ENV_ADDR); |
6d0f6bcf3
|
224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
printf("CONFIG_SYS_RELOC_MONITOR_BASE = 0x%lx (%d) ", CONFIG_SYS_RELOC_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN); printf("CONFIG_SYS_MALLOC_BASE = 0x%lx (%d) ", CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); printf("CONFIG_SYS_INIT_SP_OFFSET = 0x%lx (%d) ", CONFIG_SYS_INIT_SP_OFFSET, CONFIG_SYS_STACK_SIZE); printf("CONFIG_SYS_PROM_OFFSET = 0x%lx (%d) ", CONFIG_SYS_PROM_OFFSET, CONFIG_SYS_PROM_SIZE); printf("CONFIG_SYS_GBL_DATA_OFFSET = 0x%lx (%d) ", CONFIG_SYS_GBL_DATA_OFFSET, |
25ddd1fb0
|
238 |
GENERATED_GBL_DATA_SIZE); |
00ab32c85
|
239 240 |
#if defined(CONFIG_CMD_NET) |
de2dff6ff
|
241 |
print_eth(0); |
50a47d052
|
242 243 |
printf("ip_addr = %s ", getenv("ipaddr")); |
00ab32c85
|
244 |
#endif |
b6446b677
|
245 246 |
printf("baudrate = %6ld bps ", bd->bi_baudrate); |
00ab32c85
|
247 248 |
return 0; } |
c99ea7907
|
249 |
#elif defined(CONFIG_M68K) |
5902e8f71
|
250 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
8e585f02f
|
251 |
{ |
8e585f02f
|
252 |
bd_t *bd = gd->bd; |
8ae158cd8
|
253 |
|
5902e8f71
|
254 255 256 257 258 |
print_num("memstart", (ulong)bd->bi_memstart); print_lnum("memsize", (u64)bd->bi_memsize); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); |
6d0f6bcf3
|
259 |
#if defined(CONFIG_SYS_INIT_RAM_ADDR) |
5902e8f71
|
260 261 |
print_num("sramstart", (ulong)bd->bi_sramstart); print_num("sramsize", (ulong)bd->bi_sramsize); |
8e585f02f
|
262 |
#endif |
6d0f6bcf3
|
263 |
#if defined(CONFIG_SYS_MBAR) |
5902e8f71
|
264 |
print_num("mbar", bd->bi_mbar_base); |
8e585f02f
|
265 |
#endif |
0c277ef9f
|
266 267 |
print_mhz("cpufreq", bd->bi_intfreq); print_mhz("busfreq", bd->bi_busfreq); |
8ae158cd8
|
268 |
#ifdef CONFIG_PCI |
0c277ef9f
|
269 |
print_mhz("pcifreq", bd->bi_pcifreq); |
8ae158cd8
|
270 271 |
#endif #ifdef CONFIG_EXTRA_CLOCK |
0c277ef9f
|
272 273 274 |
print_mhz("flbfreq", bd->bi_flbfreq); print_mhz("inpfreq", bd->bi_inpfreq); print_mhz("vcofreq", bd->bi_vcofreq); |
8ae158cd8
|
275 |
#endif |
26667b7fa
|
276 |
#if defined(CONFIG_CMD_NET) |
de2dff6ff
|
277 |
print_eth(0); |
8e585f02f
|
278 |
#if defined(CONFIG_HAS_ETH1) |
de2dff6ff
|
279 |
print_eth(1); |
8e585f02f
|
280 |
#endif |
8e585f02f
|
281 |
#if defined(CONFIG_HAS_ETH2) |
de2dff6ff
|
282 |
print_eth(2); |
8e585f02f
|
283 |
#endif |
8e585f02f
|
284 |
#if defined(CONFIG_HAS_ETH3) |
de2dff6ff
|
285 |
print_eth(3); |
8e585f02f
|
286 |
#endif |
50a47d052
|
287 288 |
printf("ip_addr = %s ", getenv("ipaddr")); |
26667b7fa
|
289 |
#endif |
5902e8f71
|
290 291 |
printf("baudrate = %ld bps ", bd->bi_baudrate); |
8e585f02f
|
292 293 294 |
return 0; } |
8dc48d71a
|
295 |
#elif defined(CONFIG_BLACKFIN) |
c99ea7907
|
296 |
|
54841ab50
|
297 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
8dc48d71a
|
298 |
{ |
8dc48d71a
|
299 300 301 302 303 304 305 306 |
bd_t *bd = gd->bd; printf("U-Boot = %s ", bd->bi_r_version); printf("CPU = %s ", bd->bi_cpu); printf("Board = %s ", bd->bi_board_name); |
0c277ef9f
|
307 308 309 |
print_mhz("VCO", bd->bi_vco); print_mhz("CCLK", bd->bi_cclk); print_mhz("SCLK", bd->bi_sclk); |
8dc48d71a
|
310 |
|
5902e8f71
|
311 312 313 314 315 316 |
print_num("boot_params", (ulong)bd->bi_boot_params); print_num("memstart", (ulong)bd->bi_memstart); print_lnum("memsize", (u64)bd->bi_memsize); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); |
8dc48d71a
|
317 |
|
de2dff6ff
|
318 |
print_eth(0); |
50a47d052
|
319 320 |
printf("ip_addr = %s ", getenv("ipaddr")); |
b6446b677
|
321 322 |
printf("baudrate = %d bps ", bd->bi_baudrate); |
8dc48d71a
|
323 324 325 |
return 0; } |
c99ea7907
|
326 |
#elif defined(CONFIG_MIPS) |
8bde7f776
|
327 |
|
5902e8f71
|
328 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
8bde7f776
|
329 |
{ |
8bde7f776
|
330 |
bd_t *bd = gd->bd; |
5902e8f71
|
331 332 333 334 335 336 |
print_num("boot_params", (ulong)bd->bi_boot_params); print_num("memstart", (ulong)bd->bi_memstart); print_lnum("memsize", (u64)bd->bi_memsize); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); |
8bde7f776
|
337 |
|
de2dff6ff
|
338 |
print_eth(0); |
50a47d052
|
339 340 |
printf("ip_addr = %s ", getenv("ipaddr")); |
5902e8f71
|
341 342 |
printf("baudrate = %d bps ", bd->bi_baudrate); |
8bde7f776
|
343 344 345 |
return 0; } |
8bde7f776
|
346 |
|
c99ea7907
|
347 |
#elif defined(CONFIG_AVR32) |
5902e8f71
|
348 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
c99ea7907
|
349 350 |
{ bd_t *bd = gd->bd; |
5902e8f71
|
351 352 353 354 355 356 |
print_num("boot_params", (ulong)bd->bi_boot_params); print_num("memstart", (ulong)bd->bi_memstart); print_lnum("memsize", (u64)bd->bi_memsize); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); |
c99ea7907
|
357 358 |
print_eth(0); |
50a47d052
|
359 360 |
printf("ip_addr = %s ", getenv("ipaddr")); |
5902e8f71
|
361 362 |
printf("baudrate = %lu bps ", bd->bi_baudrate); |
c99ea7907
|
363 364 365 366 367 |
return 0; } #elif defined(CONFIG_ARM) |
8bde7f776
|
368 |
|
5902e8f71
|
369 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
8bde7f776
|
370 |
{ |
8bde7f776
|
371 372 |
int i; bd_t *bd = gd->bd; |
5902e8f71
|
373 374 |
print_num("arch_number", bd->bi_arch_number); print_num("boot_params", (ulong)bd->bi_boot_params); |
8bde7f776
|
375 |
|
5902e8f71
|
376 |
for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { |
8bde7f776
|
377 378 379 380 |
print_num("DRAM bank", i); print_num("-> start", bd->bi_dram[i].start); print_num("-> size", bd->bi_dram[i].size); } |
a41dbbd98
|
381 |
#if defined(CONFIG_CMD_NET) |
de2dff6ff
|
382 |
print_eth(0); |
50a47d052
|
383 384 |
printf("ip_addr = %s ", getenv("ipaddr")); |
a41dbbd98
|
385 |
#endif |
5902e8f71
|
386 387 |
printf("baudrate = %d bps ", bd->bi_baudrate); |
e47f2db53
|
388 |
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) |
5902e8f71
|
389 |
print_num("TLB addr", gd->tlb_addr); |
f1d2b313c
|
390 |
#endif |
5902e8f71
|
391 392 393 394 395 |
print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off); print_num("irq_sp", gd->irq_sp); /* irq stack pointer */ print_num("sp start ", gd->start_addr_sp); print_num("FB base ", gd->fb_base); |
8f5d46872
|
396 397 398 399 400 401 402 403 404 405 406 407 |
/* * TODO: Currently only support for davinci SOC's is added. * Remove this check once all the board implement this. */ #ifdef CONFIG_CLOCKS printf("ARM frequency = %ld MHz ", gd->bd->bi_arm_freq); printf("DSP frequency = %ld MHz ", gd->bd->bi_dsp_freq); printf("DDR frequency = %ld MHz ", gd->bd->bi_ddr_freq); #endif |
8bde7f776
|
408 409 |
return 0; } |
ebd0d062a
|
410 |
#elif defined(CONFIG_SH) |
5902e8f71
|
411 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
ebd0d062a
|
412 413 |
{ bd_t *bd = gd->bd; |
5902e8f71
|
414 415 416 417 418 |
print_num("mem start ", (ulong)bd->bi_memstart); print_lnum("mem size ", (u64)bd->bi_memsize); print_num("flash start ", (ulong)bd->bi_flashstart); print_num("flash size ", (ulong)bd->bi_flashsize); print_num("flash offset ", (ulong)bd->bi_flashoffset); |
ebd0d062a
|
419 420 421 |
#if defined(CONFIG_CMD_NET) print_eth(0); |
50a47d052
|
422 423 |
printf("ip_addr = %s ", getenv("ipaddr")); |
ebd0d062a
|
424 |
#endif |
5902e8f71
|
425 426 |
printf("baudrate = %ld bps ", (ulong)bd->bi_baudrate); |
ebd0d062a
|
427 428 |
return 0; } |
a806ee6fa
|
429 |
#elif defined(CONFIG_X86) |
5902e8f71
|
430 |
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
a806ee6fa
|
431 432 433 |
{ int i; bd_t *bd = gd->bd; |
a806ee6fa
|
434 |
|
5902e8f71
|
435 436 437 438 439 440 441 442 443 |
print_num("boot_params", (ulong)bd->bi_boot_params); print_num("bi_memstart", bd->bi_memstart); print_num("bi_memsize", bd->bi_memsize); print_num("bi_flashstart", bd->bi_flashstart); print_num("bi_flashsize", bd->bi_flashsize); print_num("bi_flashoffset", bd->bi_flashoffset); print_num("bi_sramstart", bd->bi_sramstart); print_num("bi_sramsize", bd->bi_sramsize); print_num("bi_bootflags", bd->bi_bootflags); |
0c277ef9f
|
444 445 |
print_mhz("cpufreq", bd->bi_intfreq); print_mhz("busfreq", bd->bi_busfreq); |
5902e8f71
|
446 447 |
for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { |
a806ee6fa
|
448 449 450 451 452 453 454 |
print_num("DRAM bank", i); print_num("-> start", bd->bi_dram[i].start); print_num("-> size", bd->bi_dram[i].size); } #if defined(CONFIG_CMD_NET) print_eth(0); |
50a47d052
|
455 456 |
printf("ip_addr = %s ", getenv("ipaddr")); |
0c277ef9f
|
457 |
print_mhz("ethspeed", bd->bi_ethspeed); |
a806ee6fa
|
458 |
#endif |
5902e8f71
|
459 460 |
printf("baudrate = %d bps ", bd->bi_baudrate); |
a806ee6fa
|
461 462 463 |
return 0; } |
6fcc3be45
|
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
#elif defined(CONFIG_SANDBOX) int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; bd_t *bd = gd->bd; print_num("boot_params", (ulong)bd->bi_boot_params); for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { print_num("DRAM bank", i); print_num("-> start", bd->bi_dram[i].start); print_num("-> size", bd->bi_dram[i].size); } #if defined(CONFIG_CMD_NET) print_eth(0); |
50a47d052
|
481 482 |
printf("ip_addr = %s ", getenv("ipaddr")); |
6fcc3be45
|
483 484 485 486 |
#endif print_num("FB base ", gd->fb_base); return 0; } |
64d614617
|
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
#elif defined(CONFIG_NDS32) int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; bd_t *bd = gd->bd; print_num("arch_number", bd->bi_arch_number); print_num("boot_params", (ulong)bd->bi_boot_params); for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { print_num("DRAM bank", i); print_num("-> start", bd->bi_dram[i].start); print_num("-> size", bd->bi_dram[i].size); } #if defined(CONFIG_CMD_NET) print_eth(0); |
50a47d052
|
505 506 |
printf("ip_addr = %s ", getenv("ipaddr")); |
64d614617
|
507 508 509 510 511 512 |
#endif printf("baudrate = %d bps ", bd->bi_baudrate); return 0; } |
2be9fdbfc
|
513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
#elif defined(CONFIG_OPENRISC) int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_num("mem start", (ulong)bd->bi_memstart); print_lnum("mem size", (u64)bd->bi_memsize); print_num("flash start", (ulong)bd->bi_flashstart); print_num("flash size", (ulong)bd->bi_flashsize); print_num("flash offset", (ulong)bd->bi_flashoffset); #if defined(CONFIG_CMD_NET) print_eth(0); |
50a47d052
|
527 528 |
printf("ip_addr = %s ", getenv("ipaddr")); |
2be9fdbfc
|
529 530 531 532 533 534 535 |
#endif printf("baudrate = %ld bps ", bd->bi_baudrate); return 0; } |
c99ea7907
|
536 537 538 |
#else #error "a case for this architecture does not exist!" #endif |
8bde7f776
|
539 |
|
8bde7f776
|
540 |
/* -------------------------------------------------------------------- */ |
0d4983930
|
541 542 |
U_BOOT_CMD( bdinfo, 1, 1, do_bdinfo, |
2fb2604d5
|
543 |
"print Board Info structure", |
a89c33db9
|
544 |
"" |
8bde7f776
|
545 |
); |