All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] common/board_r: make sure to call initr_dm() before initr_trace()
Date: Thu, 12 Nov 2020 13:32:09 +0100	[thread overview]
Message-ID: <e78560fe-c1a2-b51b-4a54-a67bb49d88df@gmx.de> (raw)
In-Reply-To: <20201112111859.7762-1-pragnesh.patel@sifive.com>

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@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.

Can't we move initr_trace down in the code to after both initr_of_live
and initr_dm?

@Simon:
Please, advise.

Best regards

Heinrich

>  #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \
>  	defined(CONFIG_SANDBOX)
>  	board_init,	/* Setup chipselects */
>

       reply	other threads:[~2020-11-12 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201112111859.7762-1-pragnesh.patel@sifive.com>
2020-11-12 12:32 ` Heinrich Schuchardt [this message]
2020-11-15 12:16   ` [PATCH] common/board_r: make sure to call initr_dm() before initr_trace() Pragnesh Patel
2020-11-16 23:53     ` Simon Glass
2020-11-17  5:23       ` Pragnesh Patel
2020-11-18 14:37         ` Simon Glass
2020-11-19 10:42           ` Pragnesh Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e78560fe-c1a2-b51b-4a54-a67bb49d88df@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.