1 // SPDX-License-Identifier: GPL-2.0+
3 * PPC-specific information for the 'bd' command
10 #include <asm/global_data.h>
12 DECLARE_GLOBAL_DATA_PTR;
14 int arch_setup_bdinfo(void)
16 struct bd_info *bd = gd->bd;
18 #if defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
19 bd->bi_immr_base = CONFIG_SYS_IMMR; /* base of IMMR register */
22 #if defined(CONFIG_MPC83xx)
23 bd->bi_immrbar = CONFIG_SYS_IMMR;
26 bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
27 bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */
32 void __weak board_detail(void)
34 /* Please define board_detail() for your PPC platform */
37 void arch_print_bdinfo(void)
39 struct bd_info *bd = gd->bd;
41 bdinfo_print_mhz("busfreq", bd->bi_busfreq);
42 #if defined(CONFIG_MPC8xx) || defined(CONFIG_E500)
43 bdinfo_print_num_l("immr_base", bd->bi_immr_base);
45 bdinfo_print_num_l("bootflags", bd->bi_bootflags);
46 bdinfo_print_mhz("intfreq", bd->bi_intfreq);
47 #ifdef CONFIG_ENABLE_36BIT_PHYS
48 if (IS_ENABLED(CONFIG_PHYS_64BIT))
49 puts("addressing = 36-bit\n");
51 puts("addressing = 32-bit\n");