diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-08-23 21:37:44 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-09-06 13:51:19 -0400 |
commit | ed48da33927c78e6523753f0969f696cf7bf6f9e (patch) | |
tree | 16cc61d29eedd3cf2983d362a6802ec065460ad1 /test | |
parent | e342b91a08075266ac371ae1bfc9aa7dea71b5cf (diff) | |
download | u-boot-ed48da33927c78e6523753f0969f696cf7bf6f9e.tar.gz u-boot-ed48da33927c78e6523753f0969f696cf7bf6f9e.tar.bz2 u-boot-ed48da33927c78e6523753f0969f696cf7bf6f9e.zip |
test: dm: test-fdt: Use fdtdec_get_int() in dm_check_devices()
The current fdtdec_get_addr() takes into consideration #address-cells
and #size-cells for "ping-expect" property which is clearly neither.
Use fdtdec_get_int() instead and return negative one in case the
property is not in DT or the platform under test is not DT based,
i.e. mimic the current fdtdec_get_addr() behavior.
This fixes ut dm dm_test_bus_children test.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/test-fdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index eeecd1dc2d..72d0eb57e2 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -135,8 +135,8 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices) * want to test the code that sets that up * (testfdt_drv_probe()). */ - base = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), - "ping-expect"); + base = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), + "ping-expect", -1); debug("dev=%d, base=%d: %s\n", i, base, fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL)); |