[OpenWrt-Devel] [PATCH 1/2] kernel: add DT binding support to AVM EVA parser
It allows selecting split-firmware parser directly by specifying image-format in the device-tree. Signed-off-by: David Bauer --- .../generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 11 +++ 1 file changed, 11 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..399263ccca 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "mtdsplit.h" @@ -79,9 +80,19 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +static const struct of_device_id mtdsplit_eva_of_match_table[] = { + { .compatible = "avm,eva-firmware" }, + {}, +}; +#endif + static struct mtd_part_parser mtdsplit_eva_parser = { .owner = THIS_MODULE, .name = "eva-fw", +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + .of_match_table = mtdsplit_eva_of_match_table, +#endif .parse_fn = mtdsplit_parse_eva, .type = MTD_PARSER_TYPE_FIRMWARE, }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] kernel: add DT binding support to AVM EVA parser
On 01/12/2018 02:51, David Bauer wrote: It allows selecting split-firmware parser directly by specifying image-format in the device-tree. Signed-off-by: David Bauer --- .../generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 11 +++ 1 file changed, 11 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..399263ccca 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "mtdsplit.h" @@ -79,9 +80,19 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) Hi, the kernel version check is not required and can be dropped i believe John +static const struct of_device_id mtdsplit_eva_of_match_table[] = { + { .compatible = "avm,eva-firmware" }, + {}, +}; +#endif + static struct mtd_part_parser mtdsplit_eva_parser = { .owner = THIS_MODULE, .name = "eva-fw", +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + .of_match_table = mtdsplit_eva_of_match_table, +#endif .parse_fn = mtdsplit_parse_eva, .type = MTD_PARSER_TYPE_FIRMWARE, }; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] kernel: add DT binding support to AVM EVA parser
Hello John, On 03.12.18 07:24, John Crispin wrote: @@ -79,9 +80,19 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) Hi, the kernel version check is not required and can be dropped i believe John You are right, eva_mtdsplit is only used by ar71xx, ath79 and lantiq target, all K4.14 targets. I will remove the version check in the next version. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel