mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] of: partitions: Support new binding
@ 2016-11-08 13:41 Sascha Hauer
  2016-11-08 13:41 ` [PATCH 2/2] of: of_find_path: Add support for new partition binding Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2016-11-08 13:41 UTC (permalink / raw)
  To: Barebox List

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>
---
 drivers/of/partition.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index b6621f7..bdf5945 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);
 	}
 
-- 
2.10.1


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-08 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 13:41 [PATCH 1/2] of: partitions: Support new binding Sascha Hauer
2016-11-08 13:41 ` [PATCH 2/2] of: of_find_path: Add support for new partition binding Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox