Commit fb899d3b authored by Jonas Gorski's avatar Jonas Gorski Committed by Richard Weinberger

mtd: parser_imagetag: add of_match_table support

Allow matching the imagetag parser for fixed partitions defined in the
device tree.
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 6744ebb0
......@@ -24,6 +24,7 @@
#include <linux/vmalloc.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/of.h>
/* Ensure strings read from flash structs are null terminated */
#define STR_NULL_TERMINATE(x) \
......@@ -200,9 +201,16 @@ static int bcm963xx_parse_imagetag_partitions(struct mtd_info *master,
return nrparts;
}
static const struct of_device_id parse_bcm963xx_imagetag_match_table[] = {
{ .compatible = "brcm,bcm963xx-imagetag" },
{},
};
MODULE_DEVICE_TABLE(of, parse_bcm963xx_imagetag_match_table);
static struct mtd_part_parser bcm963xx_imagetag_parser = {
.parse_fn = bcm963xx_parse_imagetag_partitions,
.name = "bcm963xx-imagetag",
.of_match_table = parse_bcm963xx_imagetag_match_table,
};
module_mtd_part_parser(bcm963xx_imagetag_parser);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment