init-ld20.c 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (C) 2016 Socionext Inc.
  3. * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <spl.h>
  9. #include "../init.h"
  10. #include "../micro-support-card.h"
  11. int uniphier_ld20_init(const struct uniphier_board_data *bd)
  12. {
  13. uniphier_sbc_init_savepin(bd);
  14. uniphier_pxs2_sbc_init(bd);
  15. /* pins for NAND and System Bus are multiplexed */
  16. if (spl_boot_device() != BOOT_DEVICE_NAND)
  17. uniphier_pin_init("system_bus_grp");
  18. support_card_reset();
  19. support_card_init();
  20. led_puts("L0");
  21. memconf_init(bd);
  22. uniphier_pxs2_memconf_init(bd);
  23. led_puts("L1");
  24. uniphier_ld20_early_clk_init(bd);
  25. led_puts("L2");
  26. #ifdef CONFIG_SPL_SERIAL_SUPPORT
  27. preloader_console_init();
  28. #endif
  29. led_puts("L3");
  30. uniphier_ld20_dpll_init(bd);
  31. led_puts("L4");
  32. {
  33. int res;
  34. res = uniphier_ld20_umc_init(bd);
  35. if (res < 0) {
  36. while (1)
  37. ;
  38. }
  39. }
  40. led_puts("L5");
  41. dcache_disable();
  42. return 0;
  43. }