aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.14
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-11-09 14:57:45 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-11-09 14:57:45 +0100
commitc7c4ae35d6e9b53e2c66da7d6eadc9d77d64ed60 (patch)
tree18229504fd31e93d9f4cc2f833781bb413f49c87 /target/linux/generic/pending-4.14
parent1a73b2d0892465e999ddc4aa319895f196e8c8d3 (diff)
downloadupstream-c7c4ae35d6e9b53e2c66da7d6eadc9d77d64ed60.tar.gz
upstream-c7c4ae35d6e9b53e2c66da7d6eadc9d77d64ed60.tar.bz2
upstream-c7c4ae35d6e9b53e2c66da7d6eadc9d77d64ed60.zip
kernel: deprecate support for the generic "linux,part-probe" DT binding
It has been rejected upstream and instead a nice/more generic solution has been implemented. It's possible now to describe partitions format using "compatible" DT string. No OpenWrt target uses "linux,part-probe" anymore, leave it only in case some forks need it. It will be dropped with support for new kernels. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.14')
-rw-r--r--target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch23
-rw-r--r--target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch2
-rw-r--r--target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch2
3 files changed, 19 insertions, 8 deletions
diff --git a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
index 80ff556a49..8e5ecec63a 100644
--- a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
+++ b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
@@ -6,6 +6,12 @@ physmap_of.c to mtdpart.c. Now all drivers can use this feature by just
providing a reference to their device tree node in struct
mtd_part_parser_data.
+THIS METHOD HAS BEEN DEPRECATED
+
+Linux supports "compatible" property in the "partitions" subnode now. It
+should be used to specify partitions format (and trigger proper parser
+usage) if needed.
+
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
Documentation/devicetree/bindings/mtd/nand.txt | 16 +++++++++
@@ -104,10 +110,13 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <linux/err.h>
#include <linux/of.h>
-@@ -835,6 +836,32 @@ void deregister_mtd_parser(struct mtd_pa
+@@ -834,6 +835,37 @@ void deregister_mtd_parser(struct mtd_pa
+ }
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
- /*
++#include <linux/version.h>
++
++/*
+ * Parses the linux,part-probe device tree property.
+ * When a non null value is returned it has to be freed with kfree() by
+ * the caller.
@@ -130,14 +139,16 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+ if (count < 0)
+ return NULL;
+
++ pr_warn("Support for the generic \"linux,part-probe\" has been deprecated and will be removed soon");
++ BUILD_BUG_ON(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0));
++
+ return res;
+}
+
-+/*
+ /*
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
* are changing this array!
- */
-@@ -983,6 +1010,13 @@ int parse_mtd_partitions(struct mtd_info
+@@ -983,6 +1015,13 @@ int parse_mtd_partitions(struct mtd_info
struct mtd_partitions pparts = { };
struct mtd_part_parser *parser;
int ret, err = 0;
@@ -151,7 +162,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
if (!types)
types = mtd_is_partition(master) ? default_subpartition_types :
-@@ -1024,6 +1058,7 @@ int parse_mtd_partitions(struct mtd_info
+@@ -1024,6 +1063,7 @@ int parse_mtd_partitions(struct mtd_info
if (ret < 0 && !err)
err = ret;
}
diff --git a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
index 503a86e24e..a683db359f 100644
--- a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
+++ b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
@@ -9,7 +9,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -1113,6 +1113,62 @@ void mtd_part_parser_cleanup(struct mtd_
+@@ -1118,6 +1118,62 @@ void mtd_part_parser_cleanup(struct mtd_
}
}
diff --git a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
index 5df24dff09..523ff531ad 100644
--- a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
+++ b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
@@ -29,7 +29,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
-@@ -1223,6 +1234,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1228,6 +1239,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);