From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Michael Riesch <michael.riesch@wolfvision.net>,
barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/4] of: support of_ensure_probed for top-level machine device
Date: Mon, 13 Mar 2023 15:43:30 +0100 [thread overview]
Message-ID: <ff749ed6-95d2-8e03-306a-d3aa120c0ed0@pengutronix.de> (raw)
In-Reply-To: <a08214bb-8cb0-8fd4-d8c7-3dbbd7e5165a@wolfvision.net>
Hello Michael,
On 13.03.23 08:05, Michael Riesch wrote:
> I can sketch a patch that triggers this behavior on a Radxa ROCK3.
> Similar to my board code, this happens in the scope of a board probe
> function. Please find the sketch below.
>
> Basing on the current next:
[snip]
I see now how this could not work. I dropped the commit introducing
the breakage and redid what I wanted to achieve differently.
Thanks for reporting and sorry for the hassle,
Ahmad
>
> Board: Radxa ROCK3 Model A
> deep-probe: supported due to radxa,rock3a
> board-rock3 machine: of_device_ensure_probed_by_alias returned -19
>
> With 2b46c9df976c ("of: support of_ensure_probed for top-level machine
> device") reverted:
>
> Board: Radxa ROCK3 Model A
> deep-probe: supported due to radxa,rock3a
> rk808 rk8090: chip id: 0x8090
> rockchip_saradc fe720000.saradc@fe720000.of: registered as saradc
> board-rock3 machine: of_device_ensure_probed_by_alias returned 0
>
> Thanks and best regards,
> Michael
>
>> [...]
> ---- %< snip ----------------------------------------------------
>
> diff --git a/arch/arm/boards/radxa-rock3/board.c
> b/arch/arm/boards/radxa-rock3/board.c
> index 4b4e0613d3..771777d4ea 100644
> --- a/arch/arm/boards/radxa-rock3/board.c
> +++ b/arch/arm/boards/radxa-rock3/board.c
> @@ -15,6 +15,7 @@ static int rock3_probe(struct device *dev)
> enum bootsource bootsource = bootsource_get();
> int instance = bootsource_get_instance();
> const struct rock3_model *model;
> + int ret;
>
> model = device_get_match_data(dev);
>
> @@ -30,6 +31,9 @@ static int rock3_probe(struct device *dev)
> "/dev/mmc1");
> rk3568_bbu_mmc_register("sd", 0, "/dev/mmc0");
>
> + ret = of_device_ensure_probed_by_alias("saradc");
> + dev_info(dev, "of_device_ensure_probed_by_alias returned %d\n",
> ret);
> +
> return 0;
> }
>
> diff --git a/arch/arm/dts/rk3568-rock-3a.dts
> b/arch/arm/dts/rk3568-rock-3a.dts
> index 25a0c05737..b8dc46c706 100644
> --- a/arch/arm/dts/rk3568-rock-3a.dts
> +++ b/arch/arm/dts/rk3568-rock-3a.dts
> @@ -6,6 +6,10 @@
> #include "rk356x.dtsi"
>
> / {
> + aliases {
> + saradc = &saradc;
> + };
> +
> chosen: chosen {
> environment-sd {
> compatible = "barebox,environment";
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-03-13 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 16:53 [PATCH v2 1/4] of: base: factor out of_merge_nodes from of_copy_node Ahmad Fatoum
2023-02-10 16:53 ` [PATCH v2 2/4] of: support of_ensure_probed for top-level machine device Ahmad Fatoum
2023-03-10 14:46 ` Michael Riesch
2023-03-10 16:19 ` Ahmad Fatoum
2023-03-13 7:05 ` Michael Riesch
2023-03-13 14:43 ` Ahmad Fatoum [this message]
2023-02-10 16:53 ` [PATCH v2 3/4] boards: qemu-virt: ensure board driver probe at postcore_initcall level Ahmad Fatoum
2023-02-10 16:53 ` [PATCH v2 4/4] boards: qemu-virt: support passing in FIT public key Ahmad Fatoum
2023-02-10 17:32 ` Jan Lübbe
2023-02-13 8:45 ` Sascha Hauer
2023-02-17 13:03 ` Ahmad Fatoum
2023-03-09 12:47 ` Ahmad Fatoum
2023-03-10 9:51 ` [PATCH v2 1/4] of: base: factor out of_merge_nodes from of_copy_node Sascha Hauer
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=ff749ed6-95d2-8e03-306a-d3aa120c0ed0@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=michael.riesch@wolfvision.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox