summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-06-09 13:18:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-10 10:12:36 +0200
commitd9f85c418cab518586db146bd39e59f8aea77a14 (patch)
tree816ab703185f5f6c826b1e4e33f06243be6471ea /drivers/of
parent20dc05e4b6f2091024c14409beecf84d54d15d9d (diff)
downloadbarebox-d9f85c418cab518586db146bd39e59f8aea77a14.tar.gz
barebox-d9f85c418cab518586db146bd39e59f8aea77a14.tar.xz
of: remove unused and misleading #cells in /memreserve
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@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/fdt.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 5ccbd1bb69..42f45bbd4f 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));