blob: 2f4c60dd71c0c41b5ed636464417e44edf57d984 [file] [log] [blame]
Masahiro Yamada323d1f92015-09-22 00:27:39 +09001/*
Masahiro Yamada6a3e4272016-09-17 03:33:09 +09002 * Copyright (C) 2013-2015 Panasonic Corporation
3 * Copyright (C) 2015-2016 Socionext Inc.
4 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada323d1f92015-09-22 00:27:39 +09005 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#include <common.h>
10#include <spl.h>
Masahiro Yamada107b3fb2016-01-09 01:51:13 +090011
12#include "../init.h"
13#include "../micro-support-card.h"
Masahiro Yamada323d1f92015-09-22 00:27:39 +090014
Masahiro Yamada5b660062016-03-30 20:17:02 +090015int uniphier_ld4_init(const struct uniphier_board_data *bd)
Masahiro Yamada323d1f92015-09-22 00:27:39 +090016{
Masahiro Yamada5b660062016-03-30 20:17:02 +090017 uniphier_ld4_bcu_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090018
Masahiro Yamada5b660062016-03-30 20:17:02 +090019 uniphier_sbc_init_savepin(bd);
Masahiro Yamada5d0607c2016-03-18 16:41:44 +090020 uniphier_ld4_sbc_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090021
22 support_card_reset();
23
Masahiro Yamada6a3e4272016-09-17 03:33:09 +090024 uniphier_ld4_dpll_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090025
26 support_card_init();
27
28 led_puts("L0");
29
30 memconf_init(bd);
31
32 led_puts("L1");
33
Masahiro Yamada5b660062016-03-30 20:17:02 +090034 uniphier_ld4_early_clk_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090035
36 led_puts("L2");
37
38 led_puts("L3");
39
40#ifdef CONFIG_SPL_SERIAL_SUPPORT
41 preloader_console_init();
42#endif
43
44 led_puts("L4");
45
46 {
47 int res;
48
Masahiro Yamada5b660062016-03-30 20:17:02 +090049 res = uniphier_ld4_umc_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090050 if (res < 0) {
51 while (1)
52 ;
53 }
54 }
55
56 led_puts("L5");
57
Masahiro Yamada323d1f92015-09-22 00:27:39 +090058 return 0;
59}