]> Git Repo - u-boot.git/blame - arch/arm/lib/bdinfo.c
Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
[u-boot.git] / arch / arm / lib / bdinfo.c
CommitLineData
59b0d7d8
SG
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, [email protected].
7 */
8
03de305e 9#include <config.h>
59b0d7d8 10#include <init.h>
401d1c4f 11#include <asm/global_data.h>
85e68ae0 12#include <asm/mach-types.h>
59b0d7d8
SG
13
14DECLARE_GLOBAL_DATA_PTR;
15
85e68ae0
OP
16int arch_setup_bdinfo(void)
17{
18#ifdef CONFIG_MACH_TYPE
19 struct bd_info *bd = gd->bd;
20
21 bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
22#endif
23
24 return 0;
25}
26
59b0d7d8
SG
27void arch_print_bdinfo(void)
28{
b75d8dc5 29 struct bd_info *bd = gd->bd;
59b0d7d8 30
98592c75 31 bdinfo_print_num_l("arch_number", bd->bi_arch_number);
65cc0e2a 32#ifdef CFG_SYS_MEM_RESERVE_SECURE
59b0d7d8 33 if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
6424fba1
BM
34 bdinfo_print_num_ll("Secure ram",
35 gd->arch.secure_ram &
36 MEM_RESERVE_SECURE_ADDR_MASK);
59b0d7d8
SG
37 }
38#endif
39#ifdef CONFIG_RESV_RAM
40 if (gd->arch.resv_ram)
6424fba1 41 bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
59b0d7d8
SG
42#endif
43#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
98592c75 44 bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
59b0d7d8 45#endif
98592c75
BM
46 bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */
47 bdinfo_print_num_l("sp start ", gd->start_addr_sp);
59b0d7d8
SG
48 /*
49 * TODO: Currently only support for davinci SOC's is added.
50 * Remove this check once all the board implement this.
51 */
52#ifdef CONFIG_CLOCKS
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);
56#endif
57#ifdef CONFIG_BOARD_TYPES
58 printf("Board Type = %ld\n", gd->board_type);
59#endif
3d6d5075 60#if CONFIG_IS_ENABLED(SYS_MALLOC_F)
59b0d7d8
SG
61 printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
62 CONFIG_VAL(SYS_MALLOC_F_LEN));
63#endif
64}
This page took 0.097116 seconds and 4 git commands to generate.