bdinfo.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * PPC-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 __weak board_detail(void)
  12. {
  13. /* Please define board_detail() for your PPC platform */
  14. }
  15. void arch_print_bdinfo(void)
  16. {
  17. struct bd_info *bd = gd->bd;
  18. #if defined(CONFIG_SYS_INIT_RAM_ADDR)
  19. bdinfo_print_num("sramstart", (ulong)bd->bi_sramstart);
  20. bdinfo_print_num("sramsize", (ulong)bd->bi_sramsize);
  21. #endif
  22. bdinfo_print_mhz("busfreq", bd->bi_busfreq);
  23. #if defined(CONFIG_MPC8xx) || defined(CONFIG_E500)
  24. bdinfo_print_num("immr_base", bd->bi_immr_base);
  25. #endif
  26. bdinfo_print_num("bootflags", bd->bi_bootflags);
  27. bdinfo_print_mhz("intfreq", bd->bi_intfreq);
  28. #ifdef CONFIG_ENABLE_36BIT_PHYS
  29. if (IS_ENABLED(CONFIG_PHYS_64BIT))
  30. puts("addressing = 36-bit\n");
  31. else
  32. puts("addressing = 32-bit\n");
  33. #endif
  34. board_detail();
  35. #if defined(CONFIG_CPM2)
  36. bdinfo_print_mhz("cpmfreq", bd->bi_cpmfreq);
  37. bdinfo_print_mhz("vco", bd->bi_vco);
  38. bdinfo_print_mhz("sccfreq", bd->bi_sccfreq);
  39. bdinfo_print_mhz("brgfreq", bd->bi_brgfreq);
  40. #endif
  41. }