[PATCH v3 1/4] state: make of_state_fixup() usable outside common/state/
anis chali
chalianis1 at gmail.com
Tue Aug 25 16:34:58 PDT 2026
Hi,
Le mar. 25 août 2026 à 19:00, Ahmad Fatoum <a.fatoum at pengutronix.de> a écrit :
>
> Hi,
>
> On 8/25/26 5:05 AM, chalianis1 at gmail.com wrote:
> > From: Chali Anis <chalianis1 at gmail.com>
> >
> > of_state_fixup() was static, callable only via of_register_fixup().
> > Export it so other subsystems can invoke it directly to render a
> > state instance's devicetree representation on demand, without going
> > through the global fixup-registration/of_fix_tree() machinery.
>
> I guess I will see later what this is needed for.
>
> >
> > While exporting it, teach it to resolve backend nodes that are
> > top-level "barebox,fixed-partitions" subnodes carrying a partuuid
> > property instead of being tied to a real, already-probed storage
> > device node in the tree - the same globally-resolvable-by-UUID
> > binding drivers/of/of_path.c's of_cdev_find() already supports for
> > EFI, where devices aren't instantiated from devicetree. Without this,
> > of_state_fixup() could only find a backend reachable by walking real
> > hardware nodes already present in root, which such a partuuid-only
> > declaration never is.
>
> of_fixup_partitions() already takes care of fixing up partitions into
> the kernel DT. If it doesn't work for your use case here, it should
> perhaps be adapted instead.
>
I'm not sure, I the of_fixup_partitions does not take care of partitions defined
by their partuuid, the reproductible name does not find the partition
in the kernel
device tree as for a real mmc or spi memory where there reg and ranges to build
that string.
>
> I haven't reviewed the code, because I am unsure why this is needed and
> the commit message didn't really explain.
>
Maybe give it a try and see!
> Cheers,
> Ahmad
best regards.
Anis.
>
> --
> 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