blob: fdb2838503811706adc672dbf52bfb10b1586291 [file] [log] [blame]
Masahiro Yamada667dbcd2016-05-24 21:14:01 +09001/*
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
14int uniphier_ld11_init(const struct uniphier_board_data *bd)
15{
16 uniphier_sbc_init_savepin(bd);
17 uniphier_pxs2_sbc_init(bd);
Masahiro Yamadadacdb242016-09-26 13:13:16 +090018 /* pins for NAND and System Bus are multiplexed */
19 if (spl_boot_device() != BOOT_DEVICE_NAND)
20 uniphier_pin_init("system_bus_grp");
Masahiro Yamada667dbcd2016-05-24 21:14:01 +090021
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 Yamada667dbcd2016-05-24 21:14:01 +090036#ifdef CONFIG_SPL_SERIAL_SUPPORT
37 preloader_console_init();
38#endif
39
Masahiro Yamadac72f4d42016-09-22 07:42:19 +090040 led_puts("L3");
41
42 uniphier_ld11_dpll_init(bd);
43
Masahiro Yamada667dbcd2016-05-24 21:14:01 +090044 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}