[OpenWrt-Devel] [PATCH v2] kernel: add DT binding support to AVM EVA parser

David Bauer mail at david-bauer.net
Tue Dec 4 19:38:43 EST 2018


It allows selecting split-firmware parser directly by
specifying image-format in the device-tree.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
v2: remove kernel version check

 .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
index 746944ee2e..a30297a964 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
@@ -79,9 +79,15 @@ static int mtdsplit_parse_eva(struct mtd_info *master,
 	return EVA_NR_PARTS;
 }
 
+static const struct of_device_id mtdsplit_eva_of_match_table[] = {
+	{ .compatible = "avm,eva-firmware" },
+	{},
+};
+
 static struct mtd_part_parser mtdsplit_eva_parser = {
 	.owner = THIS_MODULE,
 	.name = "eva-fw",
+	.of_match_table = mtdsplit_eva_of_match_table,
 	.parse_fn = mtdsplit_parse_eva,
 	.type = MTD_PARSER_TYPE_FIRMWARE,
 };
-- 
2.19.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list