summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohan Jonker <jbx6244@gmail.com>2023-04-23 11:19:41 +0200
committerSimon Glass <sjg@chromium.org>2023-04-28 11:52:30 -0600
commit37937aba3518ed782fdaae9d3772c59fd1e05af8 (patch)
treed48557496c7fd96d3da00d29fc1ec67b5b3be99c /test
parentde65b122a2534a5bc61f7714f10125baee5d58f3 (diff)
downloadu-boot-37937aba3518ed782fdaae9d3772c59fd1e05af8.tar.gz
u-boot-37937aba3518ed782fdaae9d3772c59fd1e05af8.tar.bz2
u-boot-37937aba3518ed782fdaae9d3772c59fd1e05af8.zip
core: fdtaddr: use map_sysmem() as cast for the return
For the devfdt_get_addr_index_ptr() and devfdt_get_addr_size_index_ptr() function use map_sysmem() function as cast for the return for use in sandbox. Also fix sandbox test. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Drop second hunk: Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/test-fdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 8e6e42e46b..eeecd1dc2d 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -617,6 +617,7 @@ static int dm_test_fdt_get_addr_ptr_flat(struct unit_test_state *uts)
{
struct udevice *gpio, *dev;
void *ptr;
+ void *paddr;
/* Test for missing reg property */
ut_assertok(uclass_first_device_err(UCLASS_GPIO, &gpio));
@@ -624,7 +625,9 @@ static int dm_test_fdt_get_addr_ptr_flat(struct unit_test_state *uts)
ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
ptr = devfdt_get_addr_ptr(dev);
- ut_asserteq_ptr((void *)0x8000, ptr);
+
+ paddr = map_sysmem(0x8000, 0);
+ ut_asserteq_ptr(paddr, ptr);
return 0;
}