summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rk3288
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2019-07-09 21:58:43 +0800
committerKever Yang <kever.yang@rock-chips.com>2019-07-20 23:59:44 +0800
commitccab9e7ee3c4447c4bf5f4456f56a6b46f475ad4 (patch)
treec7124b05efe62c3383302dd60f6e3862ba74853a /arch/arm/mach-rockchip/rk3288
parentd7f2d23ce4281c70e8395503382474ebdd5e4238 (diff)
rockchip: rk3288: add arch_cpu_init in spl
Add arch_cpu_init() in SPL for soc related init, and move configure_l2ctlr() into it. The arch_cpu_init() only need to run once, so no need to run in TPL. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288')
-rw-r--r--arch/arm/mach-rockchip/rk3288/rk3288.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 7941ca68a6..5300650e19 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -10,11 +10,15 @@
int arch_cpu_init(void)
{
+#ifdef CONFIG_SPL_BUILD
+ configure_l2ctlr();
+#else
/* We do some SoC one time setting here. */
struct rk3288_grf * const grf = (void *)GRF_BASE;
/* Use rkpwm by default */
rk_setreg(&grf->soc_con2, 1 << 0);
+#endif
return 0;
}