aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-04-09 07:14:04 +0200
committerRafał Miłecki <rafal@milecki.pl>2018-04-09 07:16:48 +0200
commitcdcd5c93d733f6c0d6c2b21b98f5793310b867a2 (patch)
treeddb6f927adb446eca2690e644f32c4344a779ab8 /target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch
parentdda5d9b78643ca2a943759278c2ef50d595cb509 (diff)
downloadupstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.tar.gz
upstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.tar.bz2
upstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.zip
kernel: use accepted mtd patchset adding support for "compatible" string
These patches were finally accepted and are already present in the Linus's tree. This should be good enough to make is "backport" material. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch')
-rw-r--r--target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch b/target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch
new file mode 100644
index 0000000000..d6958c3eac
--- /dev/null
+++ b/target/linux/generic/backport-4.14/041-v4.17-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch
@@ -0,0 +1,44 @@
+From 97b0c7c0df3efd7048ed39d7e2dee34cafd55887 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Wed, 14 Mar 2018 13:10:44 +0100
+Subject: [PATCH] mtd: ofpart: add of_match_table with "fixed-partitions"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows using this parser with any flash driver that takes care of
+setting of_node (using mtd_set_of_node helper) correctly. Up to now
+support for "fixed-partitions" DT compatibility string was working only
+with flash drivers that were specifying "ofpart" (manually or by letting
+mtd use the default set of parsers).
+
+This matches existing bindings documentation.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Reviewed-by: Brian Norris <computersforpeace@gmail.com>
+Tested-by: Brian Norris <computersforpeace@gmail.com>
+Reviewed-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+---
+ drivers/mtd/ofpart.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/mtd/ofpart.c
++++ b/drivers/mtd/ofpart.c
+@@ -140,9 +140,16 @@ ofpart_none:
+ return ret;
+ }
+
++static const struct of_device_id parse_ofpart_match_table[] = {
++ { .compatible = "fixed-partitions" },
++ {},
++};
++MODULE_DEVICE_TABLE(of, parse_ofpart_match_table);
++
+ static struct mtd_part_parser ofpart_parser = {
+ .parse_fn = parse_fixed_partitions,
+ .name = "fixed-partitions",
++ .of_match_table = parse_ofpart_match_table,
+ };
+
+ static int parse_ofoldpart_partitions(struct mtd_info *master,