summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-11-08 14:35:19 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-11-11 09:54:42 +0100
commit1f2f980373f0232e5a385ebce0945e7950fd99ce (patch)
treed2da58d86367135d2f5daf1388ab1d99e75f2143 /drivers
parent1c7cf80f757f95635d185fed72b2bf4939a764c9 (diff)
downloadbarebox-1f2f980373f0232e5a385ebce0945e7950fd99ce.tar.gz
barebox-1f2f980373f0232e5a385ebce0945e7950fd99ce.tar.xz
of: partitions: Support new binding
The new binding recommends to put the partitions into a subnode with compatible "fixed-partitions". Add support for this binding. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/partition.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index b6621f7dad..bdf5945627 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -80,6 +80,13 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node)
return -EINVAL;
for_each_child_of_node(node, n) {
+ if (of_device_is_compatible(n, "fixed-partitions")) {
+ node = n;
+ break;
+ }
+ }
+
+ for_each_child_of_node(node, n) {
of_parse_partition(cdev, n);
}