All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Milan P. Stanić" <mps@arvanta.net>
To: Chanho Park <chanho61.park@samsung.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH v2 2/2] riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback
Date: Sat, 19 Aug 2023 13:04:07 +0200	[thread overview]
Message-ID: <20230819110407.GD3096@m1> (raw)
In-Reply-To: <20230818051103.2427590-3-chanho61.park@samsung.com>

It works.

On Fri, 2023-08-18 at 14:11, Chanho Park wrote:
> Since the Patch 55171aedda88, VisionFive2 booting has been broken [1].
> VisionFive2 board requires to enable CONFIG_TIMER_EARLY but booting went
> to panic from initr_dm_devices due to lack of a timer device.
> 
> - Error logs
> initcall sequence 00000000fffd8d38 failed at call 00000000402185e4
> (err=-19)
> 
> Thus, we need to move riscv_cpu_probe function in order to register
> the timer earlier than initr_dm_devices.
> 
> Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events")
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Signed-off-by: Chanho Park <chanho61.park at samsung.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>

> ---
>  arch/riscv/cpu/cpu.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> index ecfb1fb08c4b..0b4208e72199 100644
> --- a/arch/riscv/cpu/cpu.c
> +++ b/arch/riscv/cpu/cpu.c
> @@ -66,7 +66,7 @@ static inline bool supports_extension(char ext)
>  #endif /* CONFIG_CPU */
>  }
>  
> -static int riscv_cpu_probe(void)
> +static int riscv_cpu_probe(void *ctx, struct event *event)
>  {
>  #ifdef CONFIG_CPU
>  	int ret;
> @@ -79,6 +79,7 @@ static int riscv_cpu_probe(void)
>  
>  	return 0;
>  }
> +EVENT_SPY(EVT_DM_POST_INIT_R, riscv_cpu_probe);
>  
>  /*
>   * This is called on secondary harts just after the IPI is init'd. Currently
> @@ -95,7 +96,7 @@ int riscv_cpu_setup(void *ctx, struct event *event)
>  {
>  	int ret;
>  
> -	ret = riscv_cpu_probe();
> +	ret = riscv_cpu_probe(ctx, event);
>  	if (ret)
>  		return ret;
>  
> @@ -149,12 +150,6 @@ EVENT_SPY(EVT_DM_POST_INIT_F, riscv_cpu_setup);
>  
>  int arch_early_init_r(void)
>  {
> -	int ret;
> -
> -	ret = riscv_cpu_probe();
> -	if (ret)
> -		return ret;
> -
>  	if (IS_ENABLED(CONFIG_SYSRESET_SBI))
>  		device_bind_driver(gd->dm_root, "sbi-sysreset",
>  				   "sbi-sysreset", NULL);
> -- 
> 2.39.2
> 

  reply	other threads:[~2023-08-19 11:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230818052645epcas2p47dad71943937119bbfe3652d178d769d@epcas2p4.samsung.com>
2023-08-18  5:11 ` [PATCH v2 0/2] introduce EVT_DM_POST_INIT_R to fix VF2 boot fail Chanho Park
2023-08-18  5:11   ` [PATCH v2 1/2] dm: event: add EVT_DM_POST_INIT_R event type Chanho Park
2023-08-19 11:01     ` Milan P. Stanić
2023-08-19 20:44     ` Simon Glass
2023-08-21 17:59     ` Roland Ruckerbauer
2023-08-23 13:36       ` Simon Glass
2023-08-21 18:05     ` [PATCH v2 1/2] dm: event: add EVT_DM_POST_INIT_R event type (resend) Roland Ruckerbauer
2023-08-18  5:11   ` [PATCH v2 2/2] riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback Chanho Park
2023-08-19 11:04     ` Milan P. Stanić [this message]
2023-08-21 18:02     ` Roland Ruckerbauer
2023-08-21 18:06     ` [PATCH v2 2/2] riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback (resend) Roland Ruckerbauer
2023-08-23 13:36     ` [PATCH v2 2/2] riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback Simon Glass

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=20230819110407.GD3096@m1 \
    --to=mps@arvanta.net \
    --cc=chanho61.park@samsung.com \
    --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.