1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-18 03:20:07 +01:00

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>
This commit is contained in:
Simon Glass
2023-11-12 08:27:49 -07:00
committed by Tom Rini
parent f2cbe6e43e
commit 79e9727f15

View File

@@ -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;