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