1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * ARM-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 #include <asm/global_data.h>
12 
13 DECLARE_GLOBAL_DATA_PTR;
14 
arch_print_bdinfo(void)15 void arch_print_bdinfo(void)
16 {
17 	struct bd_info *bd = gd->bd;
18 
19 	bdinfo_print_num_l("arch_number", bd->bi_arch_number);
20 #ifdef CONFIG_SYS_MEM_RESERVE_SECURE
21 	if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
22 		bdinfo_print_num_ll("Secure ram",
23 				    gd->arch.secure_ram &
24 				    MEM_RESERVE_SECURE_ADDR_MASK);
25 	}
26 #endif
27 #ifdef CONFIG_RESV_RAM
28 	if (gd->arch.resv_ram)
29 		bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
30 #endif
31 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
32 	bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
33 #endif
34 	bdinfo_print_num_l("irq_sp", gd->irq_sp);	/* irq stack pointer */
35 	bdinfo_print_num_l("sp start ", gd->start_addr_sp);
36 	/*
37 	 * TODO: Currently only support for davinci SOC's is added.
38 	 * Remove this check once all the board implement this.
39 	 */
40 #ifdef CONFIG_CLOCKS
41 	printf("ARM frequency = %ld MHz\n", bd->bi_arm_freq);
42 	printf("DSP frequency = %ld MHz\n", bd->bi_dsp_freq);
43 	printf("DDR frequency = %ld MHz\n", bd->bi_ddr_freq);
44 #endif
45 #ifdef CONFIG_BOARD_TYPES
46 	printf("Board Type  = %ld\n", gd->board_type);
47 #endif
48 #if CONFIG_VAL(SYS_MALLOC_F_LEN)
49 	printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
50 	       CONFIG_VAL(SYS_MALLOC_F_LEN));
51 #endif
52 }
53