board_early_init_f.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include "init.h"
  7. #include "micro-support-card.h"
  8. #include "soc-info.h"
  9. int board_early_init_f(void)
  10. {
  11. led_puts("U0");
  12. switch (uniphier_get_soc_type()) {
  13. #if defined(CONFIG_ARCH_UNIPHIER_SLD3)
  14. case SOC_UNIPHIER_SLD3:
  15. uniphier_sld3_pin_init();
  16. led_puts("U1");
  17. uniphier_ld4_clk_init();
  18. break;
  19. #endif
  20. #if defined(CONFIG_ARCH_UNIPHIER_LD4)
  21. case SOC_UNIPHIER_LD4:
  22. uniphier_ld4_pin_init();
  23. led_puts("U1");
  24. uniphier_ld4_clk_init();
  25. break;
  26. #endif
  27. #if defined(CONFIG_ARCH_UNIPHIER_PRO4)
  28. case SOC_UNIPHIER_PRO4:
  29. uniphier_pro4_pin_init();
  30. led_puts("U1");
  31. uniphier_pro4_clk_init();
  32. break;
  33. #endif
  34. #if defined(CONFIG_ARCH_UNIPHIER_SLD8)
  35. case SOC_UNIPHIER_SLD8:
  36. uniphier_sld8_pin_init();
  37. led_puts("U1");
  38. uniphier_ld4_clk_init();
  39. break;
  40. #endif
  41. #if defined(CONFIG_ARCH_UNIPHIER_PRO5)
  42. case SOC_UNIPHIER_PRO5:
  43. uniphier_pro5_pin_init();
  44. led_puts("U1");
  45. uniphier_pro5_clk_init();
  46. break;
  47. #endif
  48. #if defined(CONFIG_ARCH_UNIPHIER_PXS2)
  49. case SOC_UNIPHIER_PXS2:
  50. uniphier_pxs2_pin_init();
  51. led_puts("U1");
  52. uniphier_pxs2_clk_init();
  53. break;
  54. #endif
  55. #if defined(CONFIG_ARCH_UNIPHIER_LD6B)
  56. case SOC_UNIPHIER_LD6B:
  57. uniphier_ld6b_pin_init();
  58. led_puts("U1");
  59. uniphier_pxs2_clk_init();
  60. break;
  61. #endif
  62. #if defined(CONFIG_ARCH_UNIPHIER_LD11)
  63. case SOC_UNIPHIER_LD11:
  64. uniphier_ld20_pin_init();
  65. led_puts("U1");
  66. uniphier_ld11_clk_init();
  67. break;
  68. #endif
  69. #if defined(CONFIG_ARCH_UNIPHIER_LD20)
  70. case SOC_UNIPHIER_LD20:
  71. uniphier_ld20_pin_init();
  72. led_puts("U1");
  73. uniphier_ld20_clk_init();
  74. cci500_init(2);
  75. break;
  76. #endif
  77. default:
  78. break;
  79. }
  80. led_puts("U2");
  81. return 0;
  82. }