diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-05-30 09:41:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-05-31 10:17:45 +0200 |
commit | 768f9f5ef9df3e9a162176cedf3e76a9d4e7cd1b (patch) | |
tree | c410784035c8eae4eb12e3bc67af7fedf96e3b4c /pbl | |
parent | 297a672211d935f77b7a03ef962b0ed82a901174 (diff) | |
download | barebox-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", |