blob: a0760461ad2e9c189e9216a1df86281b4e2ed4b1 [file] [log] [blame]
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +09001/*
Masahiro Yamada68557ec2016-09-17 03:33:06 +09002 * Copyright (C) 2016 Socionext Inc.
3 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +09004 *
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_ld20_init(const struct uniphier_board_data *bd)
15{
16 uniphier_sbc_init_savepin(bd);
Masahiro Yamada5eb41502016-04-28 15:37:15 +090017 uniphier_pxs2_sbc_init(bd);
Masahiro Yamada68557ec2016-09-17 03:33:06 +090018 uniphier_pin_init("system_bus_grp");
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090019
20 support_card_reset();
21
22 support_card_init();
23
24 led_puts("L0");
25
26 memconf_init(bd);
27 uniphier_pxs2_memconf_init(bd);
28
29 led_puts("L1");
30
31 uniphier_ld20_early_clk_init(bd);
32
33 led_puts("L2");
34
35 led_puts("L3");
36
37#ifdef CONFIG_SPL_SERIAL_SUPPORT
38 preloader_console_init();
39#endif
40
41 led_puts("L4");
42
43 {
44 int res;
45
46 res = uniphier_ld20_umc_init(bd);
47 if (res < 0) {
48 while (1)
49 ;
50 }
51 }
52
53 led_puts("L5");
54
Masahiro Yamada0bd20202016-05-24 21:13:57 +090055 dcache_disable();
56
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090057 return 0;
58}