1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-02 03:17:29 +01:00

dm: core: Complete phandle implementation using the other FDT

We need to be able to look up phandles in any FDT, not just the control
FDT. Use the 'other' FDT to test this, with a helper function which gets
this as an oftree that can then we used as needed.

Add a few more tests and some comments at the top of the file, to explain
what is going on.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-09-06 20:27:27 -06:00
committed by Tom Rini
parent 92291652b5
commit 5e96925ba5
3 changed files with 87 additions and 2 deletions

View File

@@ -599,9 +599,9 @@ ofnode oftree_get_by_phandle(oftree tree, uint phandle)
if (of_live_active())
node = np_to_ofnode(of_find_node_by_phandle(tree.np, phandle));
else
node.of_offset =
node = ofnode_from_tree_offset(tree,
fdt_node_offset_by_phandle(oftree_lookup_fdt(tree),
phandle);
phandle));
return node;
}