mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
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>
This commit is contained in:
parent
d7f2d23ce4
commit
ccab9e7ee3
3 changed files with 10 additions and 3 deletions
|
@ -103,6 +103,11 @@ static int phycore_init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
__weak int arch_cpu_init(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void board_init_f(ulong dummy)
|
void board_init_f(ulong dummy)
|
||||||
{
|
{
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
@ -127,7 +132,7 @@ void board_init_f(ulong dummy)
|
||||||
}
|
}
|
||||||
|
|
||||||
rockchip_timer_init();
|
rockchip_timer_init();
|
||||||
configure_l2ctlr();
|
arch_cpu_init();
|
||||||
|
|
||||||
ret = rockchip_get_clk(&dev);
|
ret = rockchip_get_clk(&dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch-rockchip/bootrom.h>
|
#include <asm/arch-rockchip/bootrom.h>
|
||||||
#include <asm/arch-rockchip/clock.h>
|
#include <asm/arch-rockchip/clock.h>
|
||||||
#include <asm/arch-rockchip/sys_proto.h>
|
|
||||||
#include <asm/arch-rockchip/timer.h>
|
#include <asm/arch-rockchip/timer.h>
|
||||||
|
|
||||||
void board_init_f(ulong dummy)
|
void board_init_f(ulong dummy)
|
||||||
|
@ -38,7 +37,6 @@ void board_init_f(ulong dummy)
|
||||||
}
|
}
|
||||||
|
|
||||||
rockchip_timer_init();
|
rockchip_timer_init();
|
||||||
configure_l2ctlr();
|
|
||||||
|
|
||||||
ret = rockchip_get_clk(&dev);
|
ret = rockchip_get_clk(&dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
|
@ -10,11 +10,15 @@
|
||||||
|
|
||||||
int arch_cpu_init(void)
|
int arch_cpu_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SPL_BUILD
|
||||||
|
configure_l2ctlr();
|
||||||
|
#else
|
||||||
/* We do some SoC one time setting here. */
|
/* We do some SoC one time setting here. */
|
||||||
struct rk3288_grf * const grf = (void *)GRF_BASE;
|
struct rk3288_grf * const grf = (void *)GRF_BASE;
|
||||||
|
|
||||||
/* Use rkpwm by default */
|
/* Use rkpwm by default */
|
||||||
rk_setreg(&grf->soc_con2, 1 << 0);
|
rk_setreg(&grf->soc_con2, 1 << 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue