[PATCH 01/15] PBL: fdt: fix /memory parsing when #address-cells != #size-cells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 pbl/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pbl/fdt.c b/pbl/fdt.c
index 51719698f269..8e4d1295074a 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",
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux