1 // SPDX-License-Identifier: GPL-2.0+
3 * ARM-specific information for the 'bd' command
6 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
11 #include <asm/global_data.h>
12 #include <asm/mach-types.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 int arch_setup_bdinfo(void)
18 #ifdef CONFIG_MACH_TYPE
19 struct bd_info *bd = gd->bd;
21 bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
27 void arch_print_bdinfo(void)
29 struct bd_info *bd = gd->bd;
31 bdinfo_print_num_l("arch_number", bd->bi_arch_number);
32 #ifdef CONFIG_SYS_MEM_RESERVE_SECURE
33 if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
34 bdinfo_print_num_ll("Secure ram",
36 MEM_RESERVE_SECURE_ADDR_MASK);
39 #ifdef CONFIG_RESV_RAM
40 if (gd->arch.resv_ram)
41 bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
43 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
44 bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
46 bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */
47 bdinfo_print_num_l("sp start ", gd->start_addr_sp);
49 * TODO: Currently only support for davinci SOC's is added.
50 * Remove this check once all the board implement this.
53 printf("ARM frequency = %ld MHz\n", bd->bi_arm_freq);
54 printf("DSP frequency = %ld MHz\n", bd->bi_dsp_freq);
55 printf("DDR frequency = %ld MHz\n", bd->bi_ddr_freq);
57 #ifdef CONFIG_BOARD_TYPES
58 printf("Board Type = %ld\n", gd->board_type);
60 #if CONFIG_VAL(SYS_MALLOC_F_LEN)
61 printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
62 CONFIG_VAL(SYS_MALLOC_F_LEN));