[PATCH v3 1/4] state: make of_state_fixup() usable outside common/state/

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Aug 25 10:00:30 PDT 2026


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 haven't reviewed the code, because I am unsure why this is needed and
the commit message didn't really explain.

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