init-ld11.c 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_ld11_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. led_puts("L1");
  23. uniphier_ld11_early_clk_init(bd);
  24. led_puts("L2");
  25. #ifdef CONFIG_SPL_SERIAL_SUPPORT
  26. preloader_console_init();
  27. #endif
  28. led_puts("L3");
  29. uniphier_ld11_dpll_init(bd);
  30. led_puts("L4");
  31. {
  32. int res;
  33. res = uniphier_ld11_umc_init(bd);
  34. if (res < 0) {
  35. while (1)
  36. ;
  37. }
  38. }
  39. led_puts("L5");
  40. dcache_disable();
  41. led_puts("L6");
  42. return 0;
  43. }