summaryrefslogtreecommitdiff
path: root/drivers/mtd/parsers/ofpart_core.c
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-03-12 14:49:19 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-03-28 19:27:02 +0200
commit7134a2d026d942210b4d26d6059c9d979ca7866e (patch)
treed49b43e84f5b7e5cec00ae55206eb5ef4b461c1e /drivers/mtd/parsers/ofpart_core.c
parent2fa7294175c76e1ec568aa75c1891fd908728c8d (diff)
mtd: parsers: ofpart: support Linksys Northstar partitions
This allows extending ofpart parser with support for Linksys Northstar devices. That support uses recently added quirks mechanism. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210312134919.7767-2-zajec5@gmail.com
Diffstat (limited to 'drivers/mtd/parsers/ofpart_core.c')
-rw-r--r--drivers/mtd/parsers/ofpart_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c
index 2cef527dd976..0fd8d2a0db97 100644
--- a/drivers/mtd/parsers/ofpart_core.c
+++ b/drivers/mtd/parsers/ofpart_core.c
@@ -17,6 +17,7 @@
#include <linux/mtd/partitions.h>
#include "ofpart_bcm4908.h"
+#include "ofpart_linksys_ns.h"
struct fixed_partitions_quirks {
int (*post_parse)(struct mtd_info *mtd, struct mtd_partition *parts, int nr_parts);
@@ -26,6 +27,10 @@ static struct fixed_partitions_quirks bcm4908_partitions_quirks = {
.post_parse = bcm4908_partitions_post_parse,
};
+static struct fixed_partitions_quirks linksys_ns_partitions_quirks = {
+ .post_parse = linksys_ns_partitions_post_parse,
+};
+
static const struct of_device_id parse_ofpart_match_table[];
static bool node_has_compatible(struct device_node *pp)
@@ -167,6 +172,7 @@ static const struct of_device_id parse_ofpart_match_table[] = {
{ .compatible = "fixed-partitions" },
/* Customized */
{ .compatible = "brcm,bcm4908-partitions", .data = &bcm4908_partitions_quirks, },
+ { .compatible = "linksys,ns-partitions", .data = &linksys_ns_partitions_quirks, },
{},
};
MODULE_DEVICE_TABLE(of, parse_ofpart_match_table);