Masahiro Yamada | 667dbcd | 2016-05-24 21:14:01 +0900 | [diff] [blame] | 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 | |
| 8 | #include <common.h> |
| 9 | #include <spl.h> |
| 10 | |
| 11 | #include "../init.h" |
| 12 | #include "../micro-support-card.h" |
| 13 | |
| 14 | int uniphier_ld11_init(const struct uniphier_board_data *bd) |
| 15 | { |
| 16 | uniphier_sbc_init_savepin(bd); |
| 17 | uniphier_pxs2_sbc_init(bd); |
Masahiro Yamada | dacdb24 | 2016-09-26 13:13:16 +0900 | [diff] [blame] | 18 | /* pins for NAND and System Bus are multiplexed */ |
| 19 | if (spl_boot_device() != BOOT_DEVICE_NAND) |
| 20 | uniphier_pin_init("system_bus_grp"); |
Masahiro Yamada | 667dbcd | 2016-05-24 21:14:01 +0900 | [diff] [blame] | 21 | |
| 22 | support_card_reset(); |
| 23 | |
| 24 | support_card_init(); |
| 25 | |
| 26 | led_puts("L0"); |
| 27 | |
| 28 | memconf_init(bd); |
| 29 | |
| 30 | led_puts("L1"); |
| 31 | |
| 32 | uniphier_ld11_early_clk_init(bd); |
| 33 | |
| 34 | led_puts("L2"); |
| 35 | |
Masahiro Yamada | 667dbcd | 2016-05-24 21:14:01 +0900 | [diff] [blame] | 36 | #ifdef CONFIG_SPL_SERIAL_SUPPORT |
| 37 | preloader_console_init(); |
| 38 | #endif |
| 39 | |
Masahiro Yamada | c72f4d4 | 2016-09-22 07:42:19 +0900 | [diff] [blame] | 40 | led_puts("L3"); |
| 41 | |
| 42 | uniphier_ld11_dpll_init(bd); |
| 43 | |
Masahiro Yamada | 667dbcd | 2016-05-24 21:14:01 +0900 | [diff] [blame] | 44 | led_puts("L4"); |
| 45 | |
| 46 | { |
| 47 | int res; |
| 48 | |
| 49 | res = uniphier_ld11_umc_init(bd); |
| 50 | if (res < 0) { |
| 51 | while (1) |
| 52 | ; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | led_puts("L5"); |
| 57 | |
| 58 | dcache_disable(); |
| 59 | |
| 60 | led_puts("L6"); |
| 61 | |
| 62 | return 0; |
| 63 | } |