Re: [PATCH v1 09/13] kho: Update FDT dynamically for subtree addition/removal
From: Pratyush Yadav
Date: Fri Nov 14 2025 - 12:28:00 EST
On Fri, Nov 14 2025, Pasha Tatashin wrote:
> Currently, sub-FDTs were tracked in a list (kho_out.sub_fdts) and the
> final FDT is constructed entirely from scratch during kho_finalize().
>
> We can maintain the FDT dynamically:
> 1. Initialize a valid, empty FDT in kho_init().
> 2. Use fdt_add_subnode and fdt_setprop in kho_add_subtree to
> update the FDT immediately when a subsystem registers.
> 3. Use fdt_del_node in kho_remove_subtree to remove entries.
>
> This removes the need for the intermediate sub_fdts list and the
> reconstruction logic in kho_finalize(). kho_finalize() now
> only needs to trigger memory map serialization.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
[...]
--
Regards,
Pratyush Yadav