Review docs and header for board_fdt_fixup()

Now that pre-relocation devicetree mnipulation uses an event rather than
a weak function, update the docs and remove the function from the init.h
header.

Series-to: u-boot
Cover-letter:
fdt: Use events for pre-relocation devicetree manipulation
At present a weak function is used to modify the devicetree before
relocation. This is not ideal, since it is hard to find out whether a
board provides this function or not.

Another issue is that the fixups happen in multiple places in the init
sequences, with a confusing set of #if checks.

A final issue is that the fixups are done on the flat tree, which can be
quite inefficient.

This series introduces a new event to handle these fixups, converts all
boards and update the docs. The event passes an oftree instead of a
void * so that in future it can support livetree updates.

It would be possible to remove OF_BOARD_FIXUP and just always send the
event, but this would have a small code-size impact on the majority of
boards, since only about 45 use this feature.
END
This commit is contained in:
Simon Glass
2025-06-05 06:10:10 -06:00
parent 160269a21c
commit e815adea77
3 changed files with 23 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ config OF_BOARD_FIXUP
In certain circumstances it is necessary to be able to modify
U-Boot's device tree (e.g. to delete device from it). This option
make the Device Tree writeable and provides a board-specific
"board_fix_fdt" callback (called during pre-relocation time), which
EVT_FT_FIXUP_F event spy (called during pre-relocation time), which
enables the board initialization to modifiy the Device Tree. The
modified copy is subsequently used by U-Boot after relocation.