Am 23.04.2017 um 12:50 schrieb Álvaro Fernández Rojas:
> From: Daniel Schwierzeck <daniel.schwierz...@gmail.com>
> 
> All MIPS boards that support debug uart are calling debug_uart_init right at
> the beginning of board_early_init_f.
> Instead of doing that, let's provide a generic call to debug_uart_init right
> before the call to board_init_f if debug uart is enabled.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierz...@gmail.com>
> Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
> ---
>  arch/mips/cpu/start.S | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
> index 6740fdf..f7dee81 100644
> --- a/arch/mips/cpu/start.S
> +++ b/arch/mips/cpu/start.S
> @@ -265,6 +265,12 @@ wr_done:
>       setup_stack_gd
>  #endif
>  
> +#ifdef CONFIG_DEBUG_UART
> +     PTR_LA  t9, debug_uart_init
> +     jalr    t9
> +      nop
> +#endif
> +

I think we should move this inside the "#ifndef
CONFIG_MIPS_INIT_STACK_IN_SRAM ... #endif" block and also add this in
the "#ifdef CONFIG_MIPS_INIT_STACK_IN_SRAM ... #endif" block above. This
way a SoC can use debug_uart also in lowlevel_init if it supports the
initial stack in SRAM with option CONFIG_MIPS_INIT_STACK_IN_SRAM.

>       move    a0, zero                # a0 <-- boot_flags = 0
>       PTR_LA  t9, board_init_f
>  
> 

-- 
- Daniel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to