diff options
author | Simon Glass <sjg@chromium.org> | 2022-09-06 20:27:22 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-29 22:43:43 -0400 |
commit | 928d267aeea9406497c8060c03d3a0a78a8cbaa9 (patch) | |
tree | 443df55e9b11f345966d076f6877e4f7ddcbc7dd /test/dm/ofnode.c | |
parent | 085d59411ca7cde4ca5c70beeab4fdcea209aed6 (diff) | |
download | u-boot-928d267aeea9406497c8060c03d3a0a78a8cbaa9.tar.gz |
dm: core: Add a way to look up a phandle in an oftree
When we have multiple trees, the ofnode logic needs to be told which one
to use. Create a new function which takes an oftree argument, along with
a helper to obtain the FDT pointer from an oftree.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/ofnode.c')
-rw-r--r-- | test/dm/ofnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index f146b52d625..f6bb04642e8 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -36,6 +36,8 @@ static int dm_test_ofnode_get_by_phandle(struct unit_test_state *uts) /* test unknown phandle */ ut_assert(!ofnode_valid(ofnode_get_by_phandle(0x1000000))); + ut_assert(ofnode_valid(oftree_get_by_phandle(oftree_default(), 1))); + return 0; } DM_TEST(dm_test_ofnode_get_by_phandle, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); |