rockchip: rk3399: spl: Don't init dram if TPL enabled
Subsystems (3)
PATCH 1/1 rockchip: rk3399: spl: Don't init dram if TPL enabled
DRAM init would require in
- TPL stage if target support TPL and
- SPL stage if target support SPL alone
So, don't initialize the dram in SPL if TPL defined and at the same time enable it if TPL undefined which is SPL alone.
Tested in TPL and SPL supported boards.
--- arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-rockchip/rk3399-board-spl.c +2 -0
@@ -198,11 +198,13 @@ void board_init_f(ulong dummy)return ; } +#if !defined(SUPPORT_TPL ) ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret) {pr_err ("DRAM init failed: %d\n" , ret);return ; } +#endif }#if defined(SPL_GPIO_SUPPORT )
Signature · 1 line
2.18.0.321.gffc6fa0e3
A message that is not in the archive (sent off-list or not yet received): 20190508063956.26549-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org
Hi Jagan,
Quoted 19 lines · Jagan Teki
DRAM init would require in
- TPL stage if target support TPL and
- SPL stage if target support SPL aloneSo, don't initialize the dram in SPL if TPL defined and at the same time enable it if TPL undefined which is SPL alone.
Tested in TPL and SPL supported boards.
--- arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-rockchip/rk3399-board-spl.c +0
-0
arch/arm/mach-rockchip/rk3399-board-spl.c void board_init_f(ulong dummy) · line 207
Quoted 10 lines
arch/arm/mach-rockchip/rk3399-board-spl.c +2
-0@@ -198,11 +198,13 @@ void board_init_f(ulong dummy)return ; } +#if !defined(SUPPORT_TPL ) ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret) {pr_err ("DRAM init failed: %d\n" , ret);return ; } +#endif
We still need to init DRAM driver in SPL so that we can get correct ram info,
but we don't need to run the dram init program, which should have been handled in DRAM driver.
Thanks,
- Kever
Quoted 3 lines
arch/arm/mach-rockchip/rk3399-board-spl.c +0
-0}#if defined(SPL_GPIO_SUPPORT )