summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:05 +0100
commita024d889a02a0c7e1e2406ae0be358906150d713 (patch)
treee4c35d2991a012d21ef1943f0aa68b660807bed9 /drivers/of
parenta1fc81a7fdf5088a99b073d656a68dd23f549215 (diff)
parent416024c9aefb9c484033433d9b051d422f34ce64 (diff)
downloadbarebox-a024d889a02a0c7e1e2406ae0be358906150d713.tar.gz
barebox-a024d889a02a0c7e1e2406ae0be358906150d713.tar.xz
Merge branch 'for-next/state'
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 0d8289d5fa..b082f0c656 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2274,6 +2274,18 @@ char *of_get_reproducible_name(struct device_node *node)
return basprintf("[0x%llx]", addr);
}
+ /*
+ * Special workaround for the of partition binding. In the old binding
+ * the partitions are directly under the hardware devicenode whereas in
+ * the new binding the partitions are in an extra subnode with
+ * "fixed-partitions" compatible. We skip this extra subnode from the
+ * reproducible name to get the same name for both bindings.
+ */
+ if (node->parent &&
+ of_device_is_compatible(node->parent, "fixed-partitions")) {
+ node = node->parent;
+ }
+
na = of_n_addr_cells(node);
offset = of_read_number(reg, na);