410-Use-brcm-bcm947xx-cfe-partitions-binding-for-Broadco.patch 1.3 KB

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