]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: partitions: Add OF support to AFS partitions
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 2 May 2019 14:30:28 +0000 (16:30 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 6 May 2019 19:48:46 +0000 (21:48 +0200)
This adds device tree support for AFS partitioning.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/parsers/afs.c

index d61b7edfc9382383edbd0cbb6374790a889ab444..3679e1d22595a822ca7f3867bf6abbd244d2fa6c 100644 (file)
@@ -255,9 +255,16 @@ static int parse_afs_partitions(struct mtd_info *mtd,
        return idx ? idx : ret;
 }
 
+static const struct of_device_id mtd_parser_afs_of_match_table[] = {
+       { .compatible = "arm,arm-firmware-suite" },
+       {},
+};
+MODULE_DEVICE_TABLE(of, mtd_parser_afs_of_match_table);
+
 static struct mtd_part_parser afs_parser = {
        .parse_fn = parse_afs_partitions,
        .name = "afs",
+       .of_match_table = mtd_parser_afs_of_match_table,
 };
 module_mtd_part_parser(afs_parser);