bdinfo.c 1.5 KB

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