summaryrefslogtreecommitdiffstats
path: root/pbl
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-05-30 09:41:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-05-31 10:17:45 +0200
commit768f9f5ef9df3e9a162176cedf3e76a9d4e7cd1b (patch)
treec410784035c8eae4eb12e3bc67af7fedf96e3b4c /pbl
parent297a672211d935f77b7a03ef962b0ed82a901174 (diff)
downloadbarebox-768f9f5ef9df3e9a162176cedf3e76a9d4e7cd1b.tar.gz
barebox-768f9f5ef9df3e9a162176cedf3e76a9d4e7cd1b.tar.xz
PBL: fdt: fix /memory parsing when #address-cells != #size-cells
Due to a typo, this code assumed so far ignored #size-cells and assumed it to be equal to #address-cells. This breaks using the barebox-dt-2nd.img with some 64-bit device trees like the Raspberry Pi's. Fixes: ffb0344b7410 ("ARM: Add generic device tree 2nd stage support") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220530074102.632341-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
-rw-r--r--pbl/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pbl/fdt.c b/pbl/fdt.c
index 51719698f2..8e4d129507 100644
--- a/pbl/fdt.c
+++ b/pbl/fdt.c
@@ -47,7 +47,7 @@ void fdt_find_mem(const void *fdt, unsigned long *membase, unsigned long *memsiz
pr_err("Cannot find #size-cells property");
goto err;
}
- ns = fdt32_to_cpu(*nap);
+ ns = fdt32_to_cpu(*nsp);
/* Find the memory range */
node = fdt_node_offset_by_prop_value(fdt, -1, "device_type",