[PATCH] common/board_r: make sure to call initr_dm() before initr_trace()
Pragnesh Patel
pragnesh.patel at openfive.com
Sun Nov 15 13:16:17 CET 2020
Hi Heinrich,
>-----Original Message-----
>From: Heinrich Schuchardt <xypron.glpk at gmx.de>
>Sent: 12 November 2020 18:02
>To: Pragnesh Patel <pragnesh.patel at openfive.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Simon Glass
><sjg at chromium.org>
>Subject: Re: [PATCH] common/board_r: make sure to call initr_dm() before
>initr_trace()
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>On 11/12/20 12:18 PM, Pragnesh Patel wrote:
>> Tracing need timer ticks and initr_dm() will make gd->timer and
>> gd->dm_root is equal to NULL, so make sure that initr_dm() to
>> call before tracing got enabled.
>>
>> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
>> ---
>> common/board_r.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/board_r.c b/common/board_r.c index
>> 29dd7d26d9..7140a39947 100644
>> --- a/common/board_r.c
>> +++ b/common/board_r.c
>> @@ -693,6 +693,9 @@ static int run_main_loop(void)
>> * TODO: perhaps reset the watchdog in the initcall function after each call?
>> */
>> static init_fnc_t init_sequence_r[] = {
>> +#ifdef CONFIG_DM
>> + initr_dm,
>> +#endif
>> initr_trace,
>> initr_reloc,
>> /* TODO: could x86/PPC have this also perhaps? */ @@ -718,9
>> +721,6 @@ static init_fnc_t init_sequence_r[] = {
>> initr_noncached,
>> #endif
>> initr_of_live,
>> -#ifdef CONFIG_DM
>> - initr_dm,
>> -#endif
>
>You are moving initr_of_live before initr_of_live. I doubt this will work for boards
>that have CONFIG_OF_LIVE=y.
yes you are right. It will not work for CONFIG_OF_LIVE.
>
>Can't we move initr_trace down in the code to after both initr_of_live and
>initr_dm?
>
>@Simon:
>Please, advise.
I am okay with this suggestion.
>
>Best regards
>
>Heinrich
>
>> #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) ||
>defined(CONFIG_RISCV) || \
>> defined(CONFIG_SANDBOX)
>> board_init, /* Setup chipselects */
>>
More information about the U-Boot
mailing list