aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-01-11 11:59:39 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-01-11 12:07:49 +0100
commitbde5e7a632ef06b16ea77af037c1442e10949666 (patch)
tree51dce463c6c4514b9da7ea389cab4133072c3129 /target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch
parentef27f153302b9f8296f5a8c71d08ae7392e721de (diff)
downloadupstream-bde5e7a632ef06b16ea77af037c1442e10949666.tar.gz
upstream-bde5e7a632ef06b16ea77af037c1442e10949666.tar.bz2
upstream-bde5e7a632ef06b16ea77af037c1442e10949666.zip
kernel: backport mtd implementation for "compatible" in "partitions" subnode
This backports upstream support for "compatible" DT property set for the "partitions" subnode of flash node. It allows specifying how partitions should be created/parsed. Right now only "fixed-partitions" is supported. It should eventually replace our downstream "linux,part-probe" solution. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch')
-rw-r--r--target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch
index 5e9ad8cf07..6c2e2602e1 100644
--- a/target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch
+++ b/target/linux/generic/pending-4.9/160-mtd-part-add-generic-parsing-of-linux-part-probe.patch
@@ -112,9 +112,9 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <linux/mtd/partitions.h>
+#include <linux/of.h>
#include <linux/err.h>
+ #include <linux/of.h>
- #include "mtdcore.h"
-@@ -855,6 +856,42 @@ void deregister_mtd_parser(struct mtd_pa
+@@ -856,6 +857,42 @@ void deregister_mtd_parser(struct mtd_pa
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
/*
@@ -157,9 +157,9 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
* are changing this array!
*/
-@@ -912,6 +949,13 @@ int parse_mtd_partitions(struct mtd_info
- {
- struct mtd_part_parser *parser;
+@@ -955,6 +992,13 @@ int parse_mtd_partitions(struct mtd_info
+ struct property *prop;
+ const char *compat;
int ret, err = 0;
+ const char *const *types_of = NULL;
+
@@ -169,9 +169,9 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+ types = types_of;
+ }
- if (!types)
- types = default_mtd_part_types;
-@@ -937,6 +981,7 @@ int parse_mtd_partitions(struct mtd_info
+ np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
+ of_property_for_each_string(np, "compatible", prop, compat) {
+@@ -996,6 +1040,7 @@ int parse_mtd_partitions(struct mtd_info
if (ret < 0 && !err)
err = ret;
}