2014-10-03 10:21:06 +00:00
|
|
|
/*
|
2015-02-05 05:42:55 +00:00
|
|
|
* Copyright (C) 2013-2015 Panasonic Corporation
|
2015-03-22 15:07:25 +00:00
|
|
|
* Copyright (C) 2015 Socionext Inc.
|
|
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
2014-10-03 10:21:06 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <spl.h>
|
2015-02-05 05:42:55 +00:00
|
|
|
#include <linux/compiler.h>
|
2015-02-26 17:26:44 +00:00
|
|
|
#include <mach/led.h>
|
|
|
|
#include <mach/board.h>
|
2015-02-05 05:42:55 +00:00
|
|
|
|
|
|
|
void __weak bcu_init(void)
|
|
|
|
{
|
|
|
|
};
|
|
|
|
void sbc_init(void);
|
|
|
|
void sg_init(void);
|
|
|
|
void pll_init(void);
|
|
|
|
void pin_init(void);
|
2015-02-26 17:27:04 +00:00
|
|
|
void memconf_init(void);
|
2015-02-26 17:26:51 +00:00
|
|
|
void early_clkrst_init(void);
|
2015-03-22 15:07:23 +00:00
|
|
|
void early_pin_init(void);
|
2015-02-05 05:42:55 +00:00
|
|
|
int umc_init(void);
|
|
|
|
void enable_dpll_ssc(void);
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
void spl_board_init(void)
|
|
|
|
{
|
2015-02-05 05:42:55 +00:00
|
|
|
bcu_init();
|
|
|
|
|
|
|
|
sbc_init();
|
|
|
|
|
|
|
|
sg_init();
|
|
|
|
|
|
|
|
uniphier_board_reset();
|
|
|
|
|
|
|
|
pll_init();
|
|
|
|
|
|
|
|
uniphier_board_init();
|
|
|
|
|
|
|
|
led_write(L, 0, , );
|
|
|
|
|
2015-02-26 17:27:04 +00:00
|
|
|
memconf_init();
|
2015-02-05 05:42:55 +00:00
|
|
|
|
|
|
|
led_write(L, 1, , );
|
|
|
|
|
2015-02-26 17:27:04 +00:00
|
|
|
early_clkrst_init();
|
|
|
|
|
|
|
|
led_write(L, 2, , );
|
|
|
|
|
2015-03-22 15:07:23 +00:00
|
|
|
early_pin_init();
|
|
|
|
|
|
|
|
led_write(L, 3, , );
|
|
|
|
|
2015-03-22 15:07:25 +00:00
|
|
|
#ifdef CONFIG_SPL_SERIAL_SUPPORT
|
|
|
|
preloader_console_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
led_write(L, 4, , );
|
|
|
|
|
2015-02-05 05:42:55 +00:00
|
|
|
{
|
|
|
|
int res;
|
|
|
|
|
|
|
|
res = umc_init();
|
|
|
|
if (res < 0) {
|
|
|
|
while (1)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
2015-03-22 15:07:25 +00:00
|
|
|
led_write(L, 5, , );
|
2015-02-05 05:42:55 +00:00
|
|
|
|
|
|
|
enable_dpll_ssc();
|
|
|
|
|
2015-03-22 15:07:25 +00:00
|
|
|
led_write(L, 6, , );
|
2014-10-03 10:21:06 +00:00
|
|
|
}
|