blob: b22ee07b859d5620b29ff6b550b3932ec84d31cf [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>
Simon Glass3ba929a2020-10-30 21:38:53 -060011#include <asm/global_data.h>
Simon Glassa83ab162020-05-10 14:16:56 -060012
13DECLARE_GLOBAL_DATA_PTR;
14
15void arch_print_bdinfo(void)
16{
Masahiro Yamadaf7ed78b2020-06-26 15:13:33 +090017 struct bd_info *bd = gd->bd;
Simon Glassa83ab162020-05-10 14:16:56 -060018
Bin Meng1ae7a0c2021-01-31 20:36:05 +080019 bdinfo_print_num_l("arch_number", bd->bi_arch_number);
Simon Glassa83ab162020-05-10 14:16:56 -060020#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
21 if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
Bin Mengf5dc7f62021-01-31 20:36:06 +080022 bdinfo_print_num_ll("Secure ram",
23 gd->arch.secure_ram &
24 MEM_RESERVE_SECURE_ADDR_MASK);
Simon Glassa83ab162020-05-10 14:16:56 -060025 }
26#endif
27#ifdef CONFIG_RESV_RAM
28 if (gd->arch.resv_ram)
Bin Mengf5dc7f62021-01-31 20:36:06 +080029 bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
Simon Glassa83ab162020-05-10 14:16:56 -060030#endif
31#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
Bin Meng1ae7a0c2021-01-31 20:36:05 +080032 bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
Simon Glassa83ab162020-05-10 14:16:56 -060033#endif
Bin Meng1ae7a0c2021-01-31 20:36:05 +080034 bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */
35 bdinfo_print_num_l("sp start ", gd->start_addr_sp);
Simon Glassa83ab162020-05-10 14:16:56 -060036 /*
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}