aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass2023-11-12 08:27:49 -0700
committerTom Rini2023-12-13 18:39:05 -0500
commit79e9727f152f4e0ea46ffe2da74d6fc2574e4c98 (patch)
treedbd2ba741468630e6b73584ee94cfddf8a4e9e22 /boot
parentf2cbe6e43e18e9b65190c53cb4b92dd6699cb38b (diff)
fdt: Drop the confusing casts in lmb_free()
Just use map_to_sysmem() instead of all the casting. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/image-fdt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 173ddb6e074..3e007d2b898 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -656,8 +656,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
/* Delete the old LMB reservation */
if (lmb)
- lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
- (phys_size_t)fdt_totalsize(blob));
+ lmb_free(lmb, map_to_sysmem(blob), fdt_totalsize(blob));
ret = fdt_shrink_to_minimum(blob, 0);
if (ret < 0)
@@ -666,7 +665,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
/* Create a new LMB reservation */
if (lmb)
- lmb_reserve(lmb, (ulong)blob, of_size);
+ lmb_reserve(lmb, map_to_sysmem(blob), of_size);
if (!ft_verify_fdt(blob))
goto err;