bdinfo.c 1.4 KB

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