diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2019-07-22 14:59:19 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2019-07-29 05:25:27 +0300 |
commit | 7dc79f8af0be723524bd7a242049efaa10197576 (patch) | |
tree | bc8b0cd8d7bcbf143379a2196484bee8e72f85b6 /arch/arm/mach-rockchip/rk322x | |
parent | 4eb506322e5f788424bcbd409e2d5f2f404d1e28 (diff) | |
download | u-boot-7dc79f8af0be723524bd7a242049efaa10197576.tar.xz |
rockchip: rk322x: introduce arch_cpu_init() for SoC setting init
Use arch_cpu_init() to init SoC secure region and move it to
rk322x.c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk322x')
-rw-r--r-- | arch/arm/mach-rockchip/rk322x/rk322x.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c b/arch/arm/mach-rockchip/rk322x/rk322x.c index e5250bc784..c8c656ab4b 100644 --- a/arch/arm/mach-rockchip/rk322x/rk322x.c +++ b/arch/arm/mach-rockchip/rk322x/rk322x.c @@ -42,3 +42,15 @@ void board_debug_uart_init(void) CON_IOMUX_UART2SEL_21 << CON_IOMUX_UART2SEL_SHIFT); } #endif + +int arch_cpu_init(void) +{ +#ifdef CONFIG_SPL_BUILD +#define SGRF_BASE 0x10150000 + static struct rk322x_sgrf * const sgrf = (void *)SGRF_BASE; + + /* Disable the ddr secure region setting to make it non-secure */ + rk_clrreg(&sgrf->soc_con[0], 0x4000); +#endif + return 0; +} |