diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-03 18:13:53 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-04 11:22:57 +0000 |
commit | 6702b68a7966d584e310bf7a99f4a1dc57f2f56f (patch) | |
tree | b04b8d7a658d79e4c0c07575eac9c26c36c51962 /src/soc/cavium/cn81xx | |
parent | 73eaec81689662cf5c1cd6ac5de1152e19b0c14d (diff) | |
download | coreboot-6702b68a7966d584e310bf7a99f4a1dc57f2f56f.tar.xz |
device_tree: Add phandle caching and lookups
This patch caches phandles when unflattening the device tree, so we
don't have to look up the phandle property again every time we're trying
to find the phandle of a node. This is especially important when
supporting phandle lookups, which are also added. In addition we keep
track of the highest phandle in the whole tree, which will be important
for applying overlays later.
With this, dt_get_phandle(node) becomes obsolete because the phandle is
already available as a member variable in the node.
This patch was adapted from depthcharge's http://crosreview.com/1536385
Change-Id: I9cbd67d1d13e57c25d068b3db18bb75c709d7ebe
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32863
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/cavium/cn81xx')
-rw-r--r-- | src/soc/cavium/cn81xx/soc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c index 98166b056f..05007493df 100644 --- a/src/soc/cavium/cn81xx/soc.c +++ b/src/soc/cavium/cn81xx/soc.c @@ -234,7 +234,7 @@ static int dt_platform_fixup(struct device_tree_fixup *fixup, continue; } /* Store the phandle */ - phandle = dt_get_phandle(dt_node); + phandle = dt_node->phandle; printk(BIOS_INFO, "%s: Removing node %s\n", __func__, path); list_remove(&dt_node->list_node); |