diff mbox series

[v4,2/5] rk3399: spl: Print SPL banner after relocation

Message ID 20200618153948.218506-3-jagan@amarulasolutions.com
State New
Headers show
Series roc-rk3399-pc: Custom SPL init | expand

Commit Message

Jagan Teki June 18, 2020, 3:39 p.m. UTC
Usually printing the SPL banner varies between architecture
or board codes.
- Some would print before relocation at the end board_init_f
? for making sure all initialization prior to this would happen
? properly. if at all there is a requirement for serial init,
? that happens properly since it prints all after that.
- Some would print after relocation at the spl_board_init for
? making sure all initialization prior to relocation would
  happen properly. Also debug uart on these cases would be
  available before relocation. So debug support is available
  in before and after relocation.

Rockchip SPL is following formar step to print the banner at
the end of board_init_f.

To support various custom use cases in SPL like leds, environment,
board detections later options like printing the banner after
relocation would be a better option. Printing banner would also
help to support debugging availability between relocation codes,
like debug uart available before relocation and banner availability
after relation.

By demonstrating all the above use cases, this patch is trying
to print the SPL banner after relocation.

Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil at amarulasolutions.com>
---
Changes for v4:
- none

 arch/arm/mach-rockchip/spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kever Yang June 28, 2020, 2:56 a.m. UTC | #1
Hi Jagan,

On 2020/6/18 ??11:39, Jagan Teki wrote:
> Usually printing the SPL banner varies between architecture
> or board codes.
> - Some would print before relocation at the end board_init_f
>  ? for making sure all initialization prior to this would happen
>  ? properly. if at all there is a requirement for serial init,
>  ? that happens properly since it prints all after that.
> - Some would print after relocation at the spl_board_init for
>  ? making sure all initialization prior to relocation would
>    happen properly. Also debug uart on these cases would be
>    available before relocation. So debug support is available
>    in before and after relocation.
>
> Rockchip SPL is following formar step to print the banner at
> the end of board_init_f.
>
> To support various custom use cases in SPL like leds, environment,
> board detections later options like printing the banner after
> relocation would be a better option.

I don't agree, the banner is tell people we are in SPL now, we should 
print it as soon as

possible,? if any of step like led, env, relocate and etc fails, then 
user can not see anything,

they don't event know if we have get into SPL. The update of leds and 
env does not depends

on banner print.


Thanks,

- Kever

> Printing banner would also
> help to support debugging availability between relocation codes,
> like debug uart available before relocation and banner availability
> after relation.
>
> By demonstrating all the above use cases, this patch is trying
> to print the SPL banner after relocation.
>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> Tested-by: Suniel Mahesh <sunil at amarulasolutions.com>
> ---
> Changes for v4:
> - none
>
>   arch/arm/mach-rockchip/spl.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
> index d4c83a1119..6d5c058548 100644
> --- a/arch/arm/mach-rockchip/spl.c
> +++ b/arch/arm/mach-rockchip/spl.c
> @@ -147,7 +147,6 @@ void board_init_f(ulong dummy)
>   	gd->ram_top = gd->ram_base + get_effective_memsize();
>   	gd->ram_top = board_get_usable_ram_top(gd->ram_size);
>   #endif
> -	preloader_console_init();
>   }
>   
>   __weak void rk_spl_board_init(void)
> @@ -158,6 +157,8 @@ void spl_board_init(void)
>   {
>   	/* board specific spl init */
>   	rk_spl_board_init();
> +
> +	preloader_console_init();
>   }
>   
>   #ifdef CONFIG_SPL_LOAD_FIT
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index d4c83a1119..6d5c058548 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -147,7 +147,6 @@  void board_init_f(ulong dummy)
 	gd->ram_top = gd->ram_base + get_effective_memsize();
 	gd->ram_top = board_get_usable_ram_top(gd->ram_size);
 #endif
-	preloader_console_init();
 }
 
 __weak void rk_spl_board_init(void)
@@ -158,6 +157,8 @@  void spl_board_init(void)
 {
 	/* board specific spl init */
 	rk_spl_board_init();
+
+	preloader_console_init();
 }
 
 #ifdef CONFIG_SPL_LOAD_FIT