Commit 19c52240 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-20151217' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "I was holding out on this pull request for a bit, since there are a
  few other small issues being discussed that look like 4.4-rc
  regressions.  Hopefully I can get those stabilized soon, but these are
  ready at any rate:

   - A little bit of a last-minute change for the device tree "fixed
     partition" binding.  This is needed because we might want to reuse
     the 'partitions' subnode for other sorts of partitioning
     descriptions -- e.g., for describing which on-flash partition
     format(s) might be used on the system.

   - Also tone down a warning message, since it is probably going to
     show up on a lot of systems where it should just be ignored"

* tag 'for-linus-20151217' of git://git.infradead.org/linux-mtd:
  doc: dt: mtd: partitions: add compatible property to "partitions" node
  mtd: ofpart: don't complain about missing 'partitions' node too loudly
parents 73796d8b e488ca9f
...@@ -6,7 +6,9 @@ used for what purposes, but which don't use an on-flash partition table such ...@@ -6,7 +6,9 @@ used for what purposes, but which don't use an on-flash partition table such
as RedBoot. as RedBoot.
The partition table should be a subnode of the mtd node and should be named The partition table should be a subnode of the mtd node and should be named
'partitions'. Partitions are defined in subnodes of the partitions node. 'partitions'. This node should have the following property:
- compatible : (required) must be "fixed-partitions"
Partitions are then defined in subnodes of the partitions node.
For backwards compatibility partitions as direct subnodes of the mtd device are For backwards compatibility partitions as direct subnodes of the mtd device are
supported. This use is discouraged. supported. This use is discouraged.
...@@ -36,6 +38,7 @@ Examples: ...@@ -36,6 +38,7 @@ Examples:
flash@0 { flash@0 {
partitions { partitions {
compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
...@@ -53,6 +56,7 @@ flash@0 { ...@@ -53,6 +56,7 @@ flash@0 {
flash@1 { flash@1 {
partitions { partitions {
compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
...@@ -66,6 +70,7 @@ flash@1 { ...@@ -66,6 +70,7 @@ flash@1 {
flash@2 { flash@2 {
partitions { partitions {
compatible = "fixed-partitions";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
......
...@@ -46,10 +46,18 @@ static int parse_ofpart_partitions(struct mtd_info *master, ...@@ -46,10 +46,18 @@ static int parse_ofpart_partitions(struct mtd_info *master,
ofpart_node = of_get_child_by_name(mtd_node, "partitions"); ofpart_node = of_get_child_by_name(mtd_node, "partitions");
if (!ofpart_node) { if (!ofpart_node) {
pr_warn("%s: 'partitions' subnode not found on %s. Trying to parse direct subnodes as partitions.\n", /*
master->name, mtd_node->full_name); * We might get here even when ofpart isn't used at all (e.g.,
* when using another parser), so don't be louder than
* KERN_DEBUG
*/
pr_debug("%s: 'partitions' subnode not found on %s. Trying to parse direct subnodes as partitions.\n",
master->name, mtd_node->full_name);
ofpart_node = mtd_node; ofpart_node = mtd_node;
dedicated = false; dedicated = false;
} else if (!of_device_is_compatible(ofpart_node, "fixed-partitions")) {
/* The 'partitions' subnode might be used by another parser */
return 0;
} }
/* First count the subnodes */ /* First count the subnodes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment