提交 55cdcebc 编写于 作者: K Kever Yang

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: NKever Yang <kever.yang@rock-chips.com>
上级 7e719d94
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch-rockchip/boot_mode.h> #include <asm/arch-rockchip/boot_mode.h>
#include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/grf_rk322x.h>
#include <asm/arch-rockchip/periph.h> #include <asm/arch-rockchip/periph.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -29,19 +28,6 @@ int board_late_init(void) ...@@ -29,19 +28,6 @@ int board_late_init(void)
int board_init(void) int board_init(void)
{ {
#include <asm/arch-rockchip/grf_rk322x.h>
/* 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; return 0;
} }
......
...@@ -57,6 +57,17 @@ int arch_cpu_init(void) ...@@ -57,6 +57,17 @@ int arch_cpu_init(void)
/* Disable the ddr secure region setting to make it non-secure */ /* Disable the ddr secure region setting to make it non-secure */
rk_clrreg(&sgrf->soc_con[0], 0x4000); 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 #endif
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册