From 55cdcebc99ec678da82a56a73dbc7201f3bc035a Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 22 Jul 2019 20:02:06 +0800 Subject: [PATCH] rockchip: rk322x: move SoC setting into arch_cpu_init() The SoC one time setting should go to arch_cpu_init() in rk322x.c Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/rk322x-board.c | 14 -------------- arch/arm/mach-rockchip/rk322x/rk322x.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c index 91fbd6abb8..0a129520da 100644 --- a/arch/arm/mach-rockchip/rk322x-board.c +++ b/arch/arm/mach-rockchip/rk322x-board.c @@ -10,7 +10,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -29,19 +28,6 @@ int board_late_init(void) int board_init(void) { -#include - /* Enable early UART2 channel 1 on the RK322x */ -#define GRF_BASE 0x11000000 - static struct rk322x_grf * const grf = (void *)GRF_BASE; - - /* - * The integrated macphy is enabled by default, disable it - * for saving power consuming. - */ - rk_clrsetreg(&grf->macphy_con[0], - MACPHY_CFG_ENABLE_MASK, - 0 << MACPHY_CFG_ENABLE_SHIFT); - return 0; } diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c b/arch/arm/mach-rockchip/rk322x/rk322x.c index a8677b9783..cd0bf8a70c 100644 --- a/arch/arm/mach-rockchip/rk322x/rk322x.c +++ b/arch/arm/mach-rockchip/rk322x/rk322x.c @@ -57,6 +57,17 @@ int arch_cpu_init(void) /* Disable the ddr secure region setting to make it non-secure */ rk_clrreg(&sgrf->soc_con[0], 0x4000); +#else +#define GRF_BASE 0x11000000 + static struct rk322x_grf * const grf = (void *)GRF_BASE; + /* + * The integrated macphy is enabled by default, disable it + * for saving power consuming. + */ + rk_clrsetreg(&grf->macphy_con[0], + MACPHY_CFG_ENABLE_MASK, + 0 << MACPHY_CFG_ENABLE_SHIFT); + #endif return 0; } -- 2.25.1