diff options
author | Bryan Brattlof <bb@ti.com> | 2025-02-27 11:14:41 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-13 14:22:57 -0600 |
commit | 096aa229a9e5909e40865454208a6a009dc0c02b (patch) | |
tree | 0a110792f241a628bc9f3f62b2bddf7065b7c97c | |
parent | 5c2ad0799715e7c02aa98d946a04e526fc5802b0 (diff) |
mach-k3: common_fdt: create a reserved memory node
Some device trees may not have a reserved-memory node. Rather than
exiting early we should create a new reserved-memory node along with
the memory carveout for the firmware we (U-Boot) have placed.
Signed-off-by: Bryan Brattlof <bb@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
-rw-r--r-- | arch/arm/mach-k3/common_fdt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 4a016711566..361b0c0b31b 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c @@ -122,10 +122,8 @@ int fdt_fixup_reserved(void *blob, const char *name, /* Find reserved-memory */ nodeoffset = fdt_subnode_offset(blob, 0, "reserved-memory"); - if (nodeoffset < 0) { - debug("Could not find reserved-memory node\n"); - return 0; - } + if (nodeoffset < 0) + goto add_carveout; /* Find existing matching subnode and remove it */ fdt_for_each_subnode(subnode, blob, nodeoffset) { @@ -154,6 +152,7 @@ int fdt_fixup_reserved(void *blob, const char *name, } } +add_carveout: struct fdt_memory carveout = { .start = new_address, .end = new_address + new_size - 1, |