blob: a5b9493546bccc833b304c8e254d24fdb5aedf21 [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 Yamada9e3bb842017-01-15 14:59:05 +090019 uniphier_ld4_sbc_init();
Masahiro Yamada323d1f92015-09-22 00:27:39 +090020
Masahiro Yamadaef07a992017-01-15 14:59:06 +090021 support_card_init();
Masahiro Yamada323d1f92015-09-22 00:27:39 +090022
Masahiro Yamada6a3e4272016-09-17 03:33:09 +090023 uniphier_ld4_dpll_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090024
Masahiro Yamada323d1f92015-09-22 00:27:39 +090025 led_puts("L0");
26
Masahiro Yamada8d6c99c2017-01-15 14:59:04 +090027 uniphier_memconf_2ch_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090028
29 led_puts("L1");
30
Masahiro Yamada78c627c2017-01-15 14:59:03 +090031 uniphier_sld3_early_clk_init();
32 uniphier_sld3_dram_clk_init();
Masahiro Yamada323d1f92015-09-22 00:27:39 +090033
34 led_puts("L2");
35
36 led_puts("L3");
37
38#ifdef CONFIG_SPL_SERIAL_SUPPORT
39 preloader_console_init();
40#endif
41
42 led_puts("L4");
43
44 {
45 int res;
46
Masahiro Yamada5b660062016-03-30 20:17:02 +090047 res = uniphier_ld4_umc_init(bd);
Masahiro Yamada323d1f92015-09-22 00:27:39 +090048 if (res < 0) {
49 while (1)
50 ;
51 }
52 }
53
54 led_puts("L5");
55
Masahiro Yamada323d1f92015-09-22 00:27:39 +090056 return 0;
57}