410-mtd-cybertan-trx-parser.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From: Christian Lamparter <[email protected]>
  2. Subject: [PATCH] ath79: port cybertan_part from ar71xx
  3. This patch ports the cybertan_part code from ar71xx and converts the
  4. driver to a DT-supported mtd parser. As a result, it will no longer
  5. add the u-boot, nvram and art partitions, which were never part of
  6. the special Cybertan header.
  7. Instead these partitions have to be specified in the DT, which has the
  8. upside of making it possible to add properties (i.e.: read-only), labels
  9. and references to these important partitions.
  10. Submitted-by: Christian Lamparter <[email protected]>
  11. ---
  12. drivers/mtd/parsers/Makefile | 1 +
  13. drivers/mtd/parsers/Kconfig | 8 ++++++++
  14. 2 files changed, 9 insertions(+)
  15. --- a/drivers/mtd/parsers/Makefile
  16. +++ b/drivers/mtd/parsers/Makefile
  17. @@ -9,6 +9,7 @@ obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
  18. ofpart-y += ofpart_core.o
  19. ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908) += ofpart_bcm4908.o
  20. ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
  21. +obj-$(CONFIG_MTD_PARSER_CYBERTAN) += parser_cybertan.o
  22. obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
  23. obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
  24. obj-$(CONFIG_MTD_PARSER_TPLINK_SAFELOADER) += tplink_safeloader.o
  25. --- a/drivers/mtd/parsers/Kconfig
  26. +++ b/drivers/mtd/parsers/Kconfig
  27. @@ -112,6 +112,14 @@ config MTD_OF_PARTS_LINKSYS_NS
  28. two "firmware" partitions. Currently used firmware has to be detected
  29. using CFE environment variable.
  30. +config MTD_PARSER_CYBERTAN
  31. + tristate "Parser for Cybertan format partitions"
  32. + depends on MTD && (ATH79 || COMPILE_TEST)
  33. + help
  34. + Cybertan has a proprietory header than encompasses a Broadcom trx
  35. + header. This driver will parse the header and take care of the
  36. + special offsets that result in the extra headers.
  37. +
  38. config MTD_PARSER_IMAGETAG
  39. tristate "Parser for BCM963XX Image Tag format partitions"
  40. depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST