c466cf3afe4d56e73d29ce410ab513da765f79ae
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.14 / 410-Use-brcm-bcm947xx-cfe-partitions-binding-for-Broadco.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Subject: [PATCH] Use "brcm,bcm947xx-cfe-partitions" binding for Broadcom
3 partitions
4
5 ---
6
7 --- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
8 +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
9 @@ -12,6 +12,10 @@
10 reg = <0>;
11 #address-cells = <1>;
12 #size-cells = <1>;
13 +
14 + partitions {
15 + compatible = "brcm,bcm947xx-cfe-partitions";
16 + };
17 };
18 };
19 };
20 --- a/arch/arm/boot/dts/bcm5301x.dtsi
21 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
22 @@ -456,8 +456,11 @@
23 compatible = "jedec,spi-nor";
24 reg = <0>;
25 spi-max-frequency = <20000000>;
26 - linux,part-probe = "ofpart", "bcm47xxpart";
27 status = "disabled";
28 +
29 + partitions {
30 + compatible = "brcm,bcm947xx-cfe-partitions";
31 + };
32 };
33 };
34
35 --- a/drivers/mtd/bcm47xxpart.c
36 +++ b/drivers/mtd/bcm47xxpart.c
37 @@ -314,9 +314,16 @@ static int bcm47xxpart_parse(struct mtd_
38 return curr_part;
39 };
40
41 +static const struct of_device_id bcm47xxpart_of_match_table[] = {
42 + { .compatible = "brcm,bcm947xx-cfe-partitions" },
43 + {},
44 +};
45 +MODULE_DEVICE_TABLE(of, bcm47xxpart_of_match_table);
46 +
47 static struct mtd_part_parser bcm47xxpart_mtd_parser = {
48 .parse_fn = bcm47xxpart_parse,
49 .name = "bcm47xxpart",
50 + .of_match_table = bcm47xxpart_of_match_table,
51 };
52 module_mtd_part_parser(bcm47xxpart_mtd_parser);
53