cmd_pinmon.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include "../sbc/sbc-regs.h"
  8. #include "../soc-info.h"
  9. #include "boot-device.h"
  10. static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  11. {
  12. printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF");
  13. switch (uniphier_get_soc_type()) {
  14. #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
  15. case SOC_UNIPHIER_PH1_SLD3:
  16. ph1_sld3_boot_mode_show();
  17. break;
  18. #endif
  19. #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
  20. defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
  21. defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
  22. case SOC_UNIPHIER_PH1_LD4:
  23. case SOC_UNIPHIER_PH1_PRO4:
  24. case SOC_UNIPHIER_PH1_SLD8:
  25. ph1_ld4_boot_mode_show();
  26. break;
  27. #endif
  28. #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
  29. case SOC_UNIPHIER_PH1_PRO5:
  30. ph1_pro5_boot_mode_show();
  31. break;
  32. #endif
  33. #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
  34. defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
  35. case SOC_UNIPHIER_PROXSTREAM2:
  36. case SOC_UNIPHIER_PH1_LD6B:
  37. proxstream2_boot_mode_show();
  38. break;
  39. #endif
  40. default:
  41. break;
  42. }
  43. return 0;
  44. }
  45. U_BOOT_CMD(
  46. pinmon, 1, 1, do_pinmon,
  47. "pin monitor",
  48. ""
  49. );