aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt7
-rw-r--r--drivers/mtd/ofpart.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index f1e2a02381a4..1c63e40659fc 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -6,7 +6,9 @@ used for what purposes, but which don't use an on-flash partition table such
6as RedBoot. 6as RedBoot.
7 7
8The partition table should be a subnode of the mtd node and should be named 8The partition table should be a subnode of the mtd node and should be named
9'partitions'. Partitions are defined in subnodes of the partitions node. 9'partitions'. This node should have the following property:
10- compatible : (required) must be "fixed-partitions"
11Partitions are then defined in subnodes of the partitions node.
10 12
11For backwards compatibility partitions as direct subnodes of the mtd device are 13For backwards compatibility partitions as direct subnodes of the mtd device are
12supported. This use is discouraged. 14supported. This use is discouraged.
@@ -36,6 +38,7 @@ Examples:
36 38
37flash@0 { 39flash@0 {
38 partitions { 40 partitions {
41 compatible = "fixed-partitions";
39 #address-cells = <1>; 42 #address-cells = <1>;
40 #size-cells = <1>; 43 #size-cells = <1>;
41 44
@@ -53,6 +56,7 @@ flash@0 {
53 56
54flash@1 { 57flash@1 {
55 partitions { 58 partitions {
59 compatible = "fixed-partitions";
56 #address-cells = <1>; 60 #address-cells = <1>;
57 #size-cells = <2>; 61 #size-cells = <2>;
58 62
@@ -66,6 +70,7 @@ flash@1 {
66 70
67flash@2 { 71flash@2 {
68 partitions { 72 partitions {
73 compatible = "fixed-partitions";
69 #address-cells = <2>; 74 #address-cells = <2>;
70 #size-cells = <2>; 75 #size-cells = <2>;
71 76
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index 3e9c5857c991..9ed6038e47d2 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -55,6 +55,9 @@ static int parse_ofpart_partitions(struct mtd_info *master,
55 master->name, mtd_node->full_name); 55 master->name, mtd_node->full_name);
56 ofpart_node = mtd_node; 56 ofpart_node = mtd_node;
57 dedicated = false; 57 dedicated = false;
58 } else if (!of_device_is_compatible(ofpart_node, "fixed-partitions")) {
59 /* The 'partitions' subnode might be used by another parser */
60 return 0;
58 } 61 }
59 62
60 /* First count the subnodes */ 63 /* First count the subnodes */