diff mbox series

[3/9,RESEND,2] mtd: partitions: Add OF support to AFS partitions

Message ID 20190502143034.16781-4-linus.walleij@linaro.org
State New
Headers show
Series AFS patches resend 2 | expand

Commit Message

Linus Walleij May 2, 2019, 2:30 p.m. UTC
This adds device tree support for AFS partitioning.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 drivers/mtd/parsers/afs.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
diff mbox series

Patch

diff --git a/drivers/mtd/parsers/afs.c b/drivers/mtd/parsers/afs.c
index d61b7edfc938..3679e1d22595 100644
--- a/drivers/mtd/parsers/afs.c
+++ b/drivers/mtd/parsers/afs.c
@@ -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);