[PATCH 2/5] common: deep-probe: support specifying support in DT

Marco Felsch m.felsch at pengutronix.de
Wed May 28 08:46:50 PDT 2025


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. 

Anyway could we add a comment that this is intentional please?

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



More information about the barebox mailing list