cmd: bdinfo: Move sram info prints to generic code
[platform/kernel/u-boot.git] / arch / powerpc / lib / bdinfo.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * PPC-specific information for the 'bd' command
4  *
5  * (C) Copyright 2003
6  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
7  */
8
9 #include <common.h>
10 #include <init.h>
11
12 DECLARE_GLOBAL_DATA_PTR;
13
14 void __weak board_detail(void)
15 {
16         /* Please define board_detail() for your PPC platform */
17 }
18
19 void arch_print_bdinfo(void)
20 {
21         struct bd_info *bd = gd->bd;
22
23         bdinfo_print_mhz("busfreq", bd->bi_busfreq);
24 #if defined(CONFIG_MPC8xx) || defined(CONFIG_E500)
25         bdinfo_print_num("immr_base", bd->bi_immr_base);
26 #endif
27         bdinfo_print_num("bootflags", bd->bi_bootflags);
28         bdinfo_print_mhz("intfreq", bd->bi_intfreq);
29 #ifdef CONFIG_ENABLE_36BIT_PHYS
30         if (IS_ENABLED(CONFIG_PHYS_64BIT))
31                 puts("addressing  = 36-bit\n");
32         else
33                 puts("addressing  = 32-bit\n");
34 #endif
35         board_detail();
36 #if defined(CONFIG_CPM2)
37         bdinfo_print_mhz("cpmfreq", bd->bi_cpmfreq);
38         bdinfo_print_mhz("vco", bd->bi_vco);
39         bdinfo_print_mhz("sccfreq", bd->bi_sccfreq);
40         bdinfo_print_mhz("brgfreq", bd->bi_brgfreq);
41 #endif
42 }