From 68e59b61c64ff7adaa808e9c127a43c65bdcf3ab Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 5 Dec 2018 01:38:43 +0100 Subject: [PATCH] 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 --- .../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.25.1