]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
core: fdtaddr: use map_sysmem() as cast for the return (part 2)
authorJohan Jonker <jbx6244@gmail.com>
Wed, 10 May 2023 21:48:44 +0000 (23:48 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 15 May 2023 21:14:46 +0000 (17:14 -0400)
For the devfdt_get_addr_size_index_ptr() function use
map_sysmem() function as cast for the return for use in
sandbox.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
drivers/core/fdtaddr.c

index 3b59b70c24ae409f6aeba1d4b48f9065e985ccd6..546db675aaf611b44315da57ba5f8e6bd8318bba 100644 (file)
@@ -131,7 +131,10 @@ void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index,
 {
        fdt_addr_t addr = devfdt_get_addr_size_index(dev, index, size);
 
-       return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)(uintptr_t)addr;
+       if (addr == FDT_ADDR_T_NONE)
+               return NULL;
+
+       return map_sysmem(addr, 0);
 }
 
 fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name)