mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-08 00:06:59 +02:00
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>
This commit is contained in:
parent
e342b91a08
commit
ed48da3392
@ -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
|
* want to test the code that sets that up
|
||||||
* (testfdt_drv_probe()).
|
* (testfdt_drv_probe()).
|
||||||
*/
|
*/
|
||||||
base = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev),
|
base = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
|
||||||
"ping-expect");
|
"ping-expect", -1);
|
||||||
debug("dev=%d, base=%d: %s\n", i, base,
|
debug("dev=%d, base=%d: %s\n", i, base,
|
||||||
fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL));
|
fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user