diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-03-14 15:07:03 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-03-14 15:13:39 +0100 |
commit | ac9bcefa3b044bf556af37a4c6b06e350a3d43c2 (patch) | |
tree | 3a685a97b0ca45a50ae947b312061b5c1f326080 /target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch | |
parent | d88e928a44725de6026859cca4248ccd5848f1c3 (diff) | |
download | upstream-ac9bcefa3b044bf556af37a4c6b06e350a3d43c2.tar.gz upstream-ac9bcefa3b044bf556af37a4c6b06e350a3d43c2.tar.bz2 upstream-ac9bcefa3b044bf556af37a4c6b06e350a3d43c2.zip |
kernel: use V10 of mtd patchset adding support for "compatible" string
In the commit bde5e7a632ef0 ("kernel: backport mtd implementation for
"compatible" in "partitions" subnode") patches that got accepted into
l2-mtd.git were backported to the kernels 4.9 and 4.14. Unfortunately
there was a regression report, patches were dropped and never reached
4.16.
This commit replaces these pseudo-backports with the latest version
that includes regression fix and futher changes that were requested.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch')
-rw-r--r-- | target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch b/target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch new file mode 100644 index 0000000000..08f048f42a --- /dev/null +++ b/target/linux/generic/pending-4.14/160-0003-mtd-ofpart-add-of_match_table-with-fixed-partitions.patch @@ -0,0 +1,40 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Thu, 4 Jan 2018 08:05:34 +0100 +Subject: [PATCH V10 3/3] 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> +--- + +--- 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, |