2018-01-11 12:59:32 +00:00
|
|
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
|
|
Subject: [PATCH] Use "brcm,bcm947xx-cfe-partitions" binding for Broadcom
|
|
|
|
partitions
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
|
|
|
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
|
|
|
@@ -13,6 +13,10 @@
|
|
|
|
reg = <0>;
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
+
|
|
|
|
+ partitions {
|
|
|
|
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
|
|
|
+ };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
|
|
|
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
2018-05-07 05:48:39 +00:00
|
|
|
@@ -456,8 +456,11 @@
|
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <20000000>;
|
|
|
|
- linux,part-probe = "ofpart", "bcm47xxpart";
|
|
|
|
status = "disabled";
|
2018-01-11 12:59:32 +00:00
|
|
|
+
|
2018-05-07 05:48:39 +00:00
|
|
|
+ partitions {
|
|
|
|
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
|
|
|
+ };
|
2018-01-11 12:59:32 +00:00
|
|
|
};
|
2018-05-07 05:48:39 +00:00
|
|
|
};
|
2018-01-11 12:59:32 +00:00
|
|
|
|
|
|
|
--- a/drivers/mtd/bcm47xxpart.c
|
|
|
|
+++ b/drivers/mtd/bcm47xxpart.c
|
2018-04-12 06:25:17 +00:00
|
|
|
@@ -314,9 +314,16 @@ static int bcm47xxpart_parse(struct mtd_
|
2018-01-11 12:59:32 +00:00
|
|
|
return curr_part;
|
|
|
|
};
|
|
|
|
|
|
|
|
+static const struct of_device_id bcm47xxpart_of_match_table[] = {
|
|
|
|
+ { .compatible = "brcm,bcm947xx-cfe-partitions" },
|
|
|
|
+ {},
|
|
|
|
+};
|
|
|
|
+MODULE_DEVICE_TABLE(of, bcm47xxpart_of_match_table);
|
|
|
|
+
|
|
|
|
static struct mtd_part_parser bcm47xxpart_mtd_parser = {
|
|
|
|
.parse_fn = bcm47xxpart_parse,
|
|
|
|
.name = "bcm47xxpart",
|
|
|
|
+ .of_match_table = bcm47xxpart_of_match_table,
|
|
|
|
};
|
|
|
|
module_mtd_part_parser(bcm47xxpart_mtd_parser);
|
|
|
|
|