blob: 5e07db18a3d7842a470491c4975971cfbc1ea9b0 [file] [log] [blame]
Masahiro Yamada1fe65d32015-09-22 00:27:41 +09001/*
2 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <spl.h>
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09009
10#include "../init.h"
11#include "../micro-support-card.h"
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090012
Masahiro Yamada98905692016-03-30 20:17:02 +090013int uniphier_pxs2_init(const struct uniphier_board_data *bd)
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090014{
Masahiro Yamada95e74872016-01-09 01:51:14 +090015 int ret;
16
Masahiro Yamada98905692016-03-30 20:17:02 +090017 uniphier_sbc_init_savepin(bd);
Masahiro Yamada7d600a62016-03-18 16:41:44 +090018 uniphier_pxs2_sbc_init(bd);
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090019
20 support_card_reset();
21
22 support_card_init();
23
24 led_puts("L0");
25
26 memconf_init(bd);
Masahiro Yamada98905692016-03-30 20:17:02 +090027 uniphier_pxs2_memconf_init(bd);
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090028
29 led_puts("L1");
30
Masahiro Yamada98905692016-03-30 20:17:02 +090031 uniphier_pxs2_early_clk_init(bd);
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090032
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
Masahiro Yamada98905692016-03-30 20:17:02 +090043 ret = uniphier_pxs2_umc_init(bd);
Masahiro Yamada95e74872016-01-09 01:51:14 +090044 if (ret)
45 return ret;
46
47 led_puts("L5");
48
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090049 return 0;
50}