blob: c8a2469f6a9d2bbb73bdbe0cd46b14de95ac4e37 [file] [log] [blame]
Masahiro Yamada5894ca02014-10-03 19:21:06 +09001/*
Masahiro Yamada35adfc42015-02-05 14:42:55 +09002 * Copyright (C) 2013-2015 Panasonic Corporation
Masahiro Yamada5894ca02014-10-03 19:21:06 +09003 * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <spl.h>
Masahiro Yamada35adfc42015-02-05 14:42:55 +090010#include <linux/compiler.h>
Masahiro Yamadaa86ac952015-02-27 02:26:44 +090011#include <mach/led.h>
12#include <mach/board.h>
Masahiro Yamada35adfc42015-02-05 14:42:55 +090013
14void __weak bcu_init(void)
15{
16};
17void sbc_init(void);
18void sg_init(void);
19void pll_init(void);
20void pin_init(void);
Masahiro Yamada198a97a2015-02-27 02:26:51 +090021void early_clkrst_init(void);
Masahiro Yamada35adfc42015-02-05 14:42:55 +090022int umc_init(void);
23void enable_dpll_ssc(void);
Masahiro Yamada5894ca02014-10-03 19:21:06 +090024
25void spl_board_init(void)
26{
Masahiro Yamada35adfc42015-02-05 14:42:55 +090027 bcu_init();
28
29 sbc_init();
30
31 sg_init();
32
33 uniphier_board_reset();
34
35 pll_init();
36
37 uniphier_board_init();
38
39 led_write(L, 0, , );
40
Masahiro Yamada198a97a2015-02-27 02:26:51 +090041 early_clkrst_init();
Masahiro Yamada35adfc42015-02-05 14:42:55 +090042
43 led_write(L, 1, , );
44
45 {
46 int res;
47
48 res = umc_init();
49 if (res < 0) {
50 while (1)
51 ;
52 }
53 }
54 led_write(L, 2, , );
55
56 enable_dpll_ssc();
57
58 led_write(L, 3, , );
Masahiro Yamada5894ca02014-10-03 19:21:06 +090059}