[PATCH v2 2/3] of: remove unused and misleading #cells in /memreserve

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

 



barebox creates a /memreserve node to hold FDT reservation entries
inside its reg property for unflattened device trees that are copied
back into the FDT reservation table on flattening.

These reservation entries are pairs of big-endian 64-bit start+size
pairs. To properly describe these in DT, we would need the
(#address|#size)-cells properties at the root node, not in the same node
having the reg property. As we don't read back these properties anyway,
just drop them.

No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v1 -> v2:
  - new patch
---
 drivers/of/fdt.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 5ccbd1bb69f8..42f45bbd4fb5 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -70,7 +70,6 @@ static int of_unflatten_reservemap(struct device_node *root,
 	int n;
 	struct property *p;
 	struct device_node *memreserve;
-	__be32 cells;
 
 	n = of_reservemap_num_entries(fdt);
 	if (n <= 0)
@@ -80,16 +79,6 @@ static int of_unflatten_reservemap(struct device_node *root,
 	if (!memreserve)
 		return -ENOMEM;
 
-	cells = cpu_to_be32(2);
-
-	p = of_new_property(memreserve, "#address-cells", &cells, sizeof(__be32));
-	if (!p)
-		return -ENOMEM;
-
-	p = of_new_property(memreserve, "#size-cells", &cells, sizeof(__be32));
-	if (!p)
-		return -ENOMEM;
-
 	p = of_new_property(memreserve, "reg",
 			    (void *)fdt + be32_to_cpu(fdt->off_mem_rsvmap),
 			    n * sizeof(struct fdt_reserve_entry));
-- 
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