blob: 25bc6e80f4760ecf9087b704f94843e537225894 [file] [log] [blame]
Simon Glassa83ab162020-05-10 14:16:56 -06001// 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
12DECLARE_GLOBAL_DATA_PTR;
13
14void arch_print_bdinfo(void)
15{
Masahiro Yamadaf7ed78b2020-06-26 15:13:33 +090016 struct bd_info *bd = gd->bd;
Simon Glassa83ab162020-05-10 14:16:56 -060017
18 bdinfo_print_num("arch_number", bd->bi_arch_number);
19#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
20 if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
21 bdinfo_print_num("Secure ram",
22 gd->arch.secure_ram &
23 MEM_RESERVE_SECURE_ADDR_MASK);
24 }
25#endif
26#ifdef CONFIG_RESV_RAM
27 if (gd->arch.resv_ram)
28 bdinfo_print_num("Reserved ram", gd->arch.resv_ram);
29#endif
30#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
31 bdinfo_print_num("TLB addr", gd->arch.tlb_addr);
32#endif
33 bdinfo_print_num("irq_sp", gd->irq_sp); /* irq stack pointer */
34 bdinfo_print_num("sp start ", gd->start_addr_sp);
35 /*
36 * TODO: Currently only support for davinci SOC's is added.
37 * Remove this check once all the board implement this.
38 */
39#ifdef CONFIG_CLOCKS
40 printf("ARM frequency = %ld MHz\n", bd->bi_arm_freq);
41 printf("DSP frequency = %ld MHz\n", bd->bi_dsp_freq);
42 printf("DDR frequency = %ld MHz\n", bd->bi_ddr_freq);
43#endif
44#ifdef CONFIG_BOARD_TYPES
45 printf("Board Type = %ld\n", gd->board_type);
46#endif
47#if CONFIG_VAL(SYS_MALLOC_F_LEN)
48 printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
49 CONFIG_VAL(SYS_MALLOC_F_LEN));
50#endif
51}