[OpenWrt-Devel] [PATCH 1/8] kernel: add DT binding support to the fit parser

Christian Lamparter chunkeey at gmail.com
Sun Dec 9 10:34:33 EST 2018


It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
index f356adcd4e..b7e56fc083 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
@@ -120,9 +120,15 @@ mtdsplit_fit_parse(struct mtd_info *mtd,
 	return 2;
 }
 
+static const struct of_device_id mtdsplit_fit_of_match_table[] = {
+	{ .compatible = "openwrt,fit-firmware" },
+	{},
+};
+
 static struct mtd_part_parser uimage_parser = {
 	.owner = THIS_MODULE,
 	.name = "fit-fw",
+	.of_match_table = mtdsplit_fit_of_match_table,
 	.parse_fn = mtdsplit_fit_parse,
 	.type = MTD_PARSER_TYPE_FIRMWARE,
 };
-- 
2.20.0.rc2


_______________________________________________
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