kernel: add DT binding support to AVM EVA parser
authorDavid Bauer <mail@david-bauer.net>
Wed, 5 Dec 2018 00:38:43 +0000 (01:38 +0100)
committerJohn Crispin <john@phrozen.org>
Thu, 6 Dec 2018 07:42:40 +0000 (08:42 +0100)
It allows selecting split-firmware parser directly by
specifying image-format in the device-tree.

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c

index 746944ee2e53635326826296bb504e89ddcfed47..a30297a964cdb8855a79e925a045d3b7d870564f 100644 (file)
@@ -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,
 };