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

mtd: bcm63xxpart: add of_match_table support

Add of_match_table support to allow using bcm63xxpart as a full flash
layout parser from 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 daa82b93
......@@ -34,6 +34,7 @@
#include <linux/vmalloc.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/of.h>
#define BCM963XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */
......@@ -311,9 +312,16 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
return ret;
};
static const struct of_device_id parse_bcm63xx_cfe_match_table[] = {
{ .compatible = "brcm,bcm963xx-cfe-nor-partitions" },
{},
};
MODULE_DEVICE_TABLE(of, parse_bcm63xx_cfe_match_table);
static struct mtd_part_parser bcm63xx_cfe_parser = {
.parse_fn = bcm63xx_parse_cfe_partitions,
.name = "bcm63xxpart",
.of_match_table = parse_bcm63xx_cfe_match_table,
};
module_mtd_part_parser(bcm63xx_cfe_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