From 4f25481b839454f0f7b1818fdba07ded4a6b1fe1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 11 Nov 2014 22:18:21 +0900 Subject: ARM: UniPhier: consolidate board_postclk_init() function This commit merges arch/arm/cpu/armv7/uniphier/ph1-*/board_postclk_init.c to arch/arm/cpu/armv7/uniphier/board_postclk_init.c Because PH1-Pro4 does not have the BCU block, add __weak to bcu_init(). Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/board_postclk_init.c | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 arch/arm/cpu/armv7/uniphier/board_postclk_init.c (limited to 'arch/arm/cpu/armv7/uniphier/board_postclk_init.c') diff --git a/arch/arm/cpu/armv7/uniphier/board_postclk_init.c b/arch/arm/cpu/armv7/uniphier/board_postclk_init.c new file mode 100644 index 0000000000..3db336fc3e --- /dev/null +++ b/arch/arm/cpu/armv7/uniphier/board_postclk_init.c @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012-2014 Panasonic Corporation + * Author: Masahiro Yamada + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include + +void __weak bcu_init(void) +{ +}; +void sbc_init(void); +void sg_init(void); +void pll_init(void); +void pin_init(void); +void clkrst_init(void); + +int board_postclk_init(void) +{ + bcu_init(); + + sbc_init(); + + sg_init(); + + uniphier_board_reset(); + + pll_init(); + + uniphier_board_init(); + + led_write(B, 1, , ); + + clkrst_init(); + + led_write(B, 2, , ); + + pin_init(); + + led_write(B, 3, , ); + + return 0; +} -- cgit From b67932e3e72b6214cde75c7e2f796d0c70ff3ffb Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 11 Nov 2014 22:18:22 +0900 Subject: ARM: UniPhier: call pin_init() also in the normal boot CONFIG_UNIPHIER_SERIAL has been moved to Kconfig and it is defined in ./.config but not in spl/.config, so pin_init() should be called from the normal image so that UART works correctly. Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/board_postclk_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/cpu/armv7/uniphier/board_postclk_init.c') diff --git a/arch/arm/cpu/armv7/uniphier/board_postclk_init.c b/arch/arm/cpu/armv7/uniphier/board_postclk_init.c index 3db336fc3e..89e44bb95b 100644 --- a/arch/arm/cpu/armv7/uniphier/board_postclk_init.c +++ b/arch/arm/cpu/armv7/uniphier/board_postclk_init.c @@ -20,6 +20,7 @@ void clkrst_init(void); int board_postclk_init(void) { +#ifdef CONFIG_SOC_INIT bcu_init(); sbc_init(); @@ -37,7 +38,7 @@ int board_postclk_init(void) clkrst_init(); led_write(B, 2, , ); - +#endif pin_init(); led_write(B, 3, , ); -- cgit