Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 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> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 11 | #include <asm/global_data.h> |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 12 | |
| 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
| 15 | void arch_print_bdinfo(void) |
| 16 | { |
Masahiro Yamada | f7ed78b | 2020-06-26 15:13:33 +0900 | [diff] [blame] | 17 | struct bd_info *bd = gd->bd; |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 18 | |
Bin Meng | 1ae7a0c | 2021-01-31 20:36:05 +0800 | [diff] [blame] | 19 | bdinfo_print_num_l("arch_number", bd->bi_arch_number); |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 20 | #ifdef CONFIG_SYS_MEM_RESERVE_SECURE |
| 21 | if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) { |
Bin Meng | f5dc7f6 | 2021-01-31 20:36:06 +0800 | [diff] [blame] | 22 | bdinfo_print_num_ll("Secure ram", |
| 23 | gd->arch.secure_ram & |
| 24 | MEM_RESERVE_SECURE_ADDR_MASK); |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 25 | } |
| 26 | #endif |
| 27 | #ifdef CONFIG_RESV_RAM |
| 28 | if (gd->arch.resv_ram) |
Bin Meng | f5dc7f6 | 2021-01-31 20:36:06 +0800 | [diff] [blame] | 29 | bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram); |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 30 | #endif |
| 31 | #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) |
Bin Meng | 1ae7a0c | 2021-01-31 20:36:05 +0800 | [diff] [blame] | 32 | bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr); |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 33 | #endif |
Bin Meng | 1ae7a0c | 2021-01-31 20:36:05 +0800 | [diff] [blame] | 34 | bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */ |
| 35 | bdinfo_print_num_l("sp start ", gd->start_addr_sp); |
Simon Glass | a83ab16 | 2020-05-10 14:16:56 -0600 | [diff] [blame] | 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 | } |