[PATCH 2/5] common: deep-probe: support specifying support in DT
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jun 2 02:53:47 PDT 2025
Hi Marco,
On 28.05.25 17:46, Marco Felsch wrote:
> On 25-05-28, Ahmad Fatoum wrote:
>> Hi,
>>
>> On 5/28/25 17:24, Marco Felsch wrote:
>>> On 25-05-28, Ahmad Fatoum wrote:
>>>> New boards should be deep probe enabled by default, which is currently
>>>> done via board code. We want to support second stage boot on new boards
>>>> without board code however, which means we need the possibility to make
>>>> deep probe opt-out instead of opt-in.
>>>>
>>>> Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
>>>> ---
>>
>> [snip]
>>
>>>> + /* deep probe requires resources to be described in DT */
>>>> + root = of_get_root_node();
>>>> + if (!root)
>>>> + return false;
>>>
>>> if (!root) {
>>> boardstate = DEEP_PROBE_NOT_SUPPORTED;
>>
>> No, the omission is intentional. I want to repeat the check for the
>> root node on every call to avoid issues where this function is
>> called once too early.
>
> Good point albeit I wouldn't assume that this happens.
>
> Also what if caller-1 receives "no" does the "no-deep-probe-handling"
> accordingly and shortly after caller-2 receives "yes". Sounds like a
> source of trouble.
If a driver requests a resource and it is not available, it returns
-EPROBE_DEFER, even with deep probe enabled, so I think barebox
shouldn't handle such a case too badly.
> Anyway could we add a comment that this is intentional please?
Done for v2.
Thanks,
Ahmad
>
> Regards,
> Marco
>
>
>>
>>>> - boardstate = DEEP_PROBE_NOT_SUPPORTED;
>>>> - pr_info("not activated\n");
>>>> - return false;
>>>
>>> Can we please add a comment about the below if-else, e.g. referencing
>>> the barebox,deep-probe.rst as well?
>>
>> Yes, will do for v2.
>>
>> Thanks for reviewing,
>> Ahmad
>> --
>> 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 |
>>
>>
>
--
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 |
More information about the barebox
mailing list