[U-Boot] [PATCH 4/4] MIPS: call debug_uart_init right before board_init_f
Marek Vasut
marex at denx.de
Sun Apr 23 11:44:07 UTC 2017
On 04/23/2017 01:31 PM, Álvaro Fernández Rojas wrote:
> Hi Marek,
>
> El 23/04/2017 a las 13:09, Marek Vasut escribió:
>> On 04/23/2017 12:50 PM, Álvaro Fernández Rojas wrote:
>>> From: Daniel Schwierzeck <daniel.schwierzeck at 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.schwierzeck at gmail.com>
>>> Signed-off-by: Álvaro Fernández Rojas <noltari at 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
>>
>> This should be called from C code somewhere, in fact, doesn't SPL's
>> common code call debug_uart_init already ?
>
> Why should this be called from C code?
Because the less stuff we have in assembler the better.
> BTW, I don't think that SPL common code calls debug_uart_init.
That's where it would make sense, grepping through the source indicates
a lot of boards call this from their spl code. Also, you enter
board_init_f right below, so you can start there ...
>>
>>> + jalr t9
>>> + nop
>>> +#endif
>>> +
>>> move a0, zero # a0 <-- boot_flags = 0
>>> PTR_LA t9, board_init_f
>>>
>>>
>>
>>
>
> Regards,
> Álvaro.
>
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list