summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/parsers/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* mtd: parsers: ar7: remove supportWolfram Sang2023-10-191-5/+0
| | | | | | | | | | AR7 is going to be removed from the Kernel, so remove its support for MTD. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
* mtd: parsers: remove reference to config MTD_NAND_TMIOLukas Bulwahn2023-03-071-1/+1
| | | | | | | | | | | | Commit 568494db6809 ("mtd: remove tmio_nand driver") removes the config MTD_NAND_TMIO and its corresponding driver. Remove the reference in MTD_SHARPSL_PARTS to that removed config. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230307074038.17391-1-lukas.bulwahn@gmail.com
* mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908Lukas Bulwahn2022-11-171-1/+1
| | | | | | | | | | | | | | | | | | | Commit dd5c672d7ca9 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA") removes config ARCH_BCM4908 as config ARCH_BCMBCA has the same intent. Probably due to concurrent development, commit 002181f5b150 ("mtd: parsers: add Broadcom's U-Boot parser") introduces 'Broadcom's U-Boot partition parser' that depends on ARCH_BCM4908, but this use was not visible during the config refactoring from the commit above. Hence, these two changes create a reference to a non-existing config symbol. Adjust the MTD_BRCM_U_BOOT definition to refer to ARCH_BCMBCA instead of ARCH_BCM4908 to remove the reference to the non-existing config symbol ARCH_BCM4908. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20221116124932.4748-1-lukas.bulwahn@gmail.com
* dt-bindings: mtd: Remove useless file about partitionsMiquel Raynal2022-11-171-1/+1
| | | | | | | | | | | | | There is already a real partitions.yaml file, so assuming everybody knows hot to read yaml schema now, this text file is no longer needed, so drop it. Depending on the situation, the lines referring to this file are either dropped or edited to point to mtd.yaml which includes partition{,s}.yaml. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-3-miquel.raynal@bootlin.com
* mtd: parsers: add TP-Link SafeLoader partitions table parserRafał Miłecki2022-11-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This parser deals with most TP-Link home routers. It reads info about partitions and registers them in the MTD subsystem. Example from TP-Link Archer C5 V2: spi-nor spi0.0: s25fl128s1 (16384 Kbytes) 15 tplink-safeloader partitions found on MTD device spi0.0 Creating 15 MTD partitions on "spi0.0": 0x000000000000-0x000000040000 : "fs-uboot" 0x000000040000-0x000000440000 : "os-image" 0x000000440000-0x000000e40000 : "rootfs" 0x000000e40000-0x000000e40200 : "default-mac" 0x000000e40200-0x000000e40400 : "pin" 0x000000e40400-0x000000e40600 : "product-info" 0x000000e50000-0x000000e60000 : "partition-table" 0x000000e60000-0x000000e60200 : "soft-version" 0x000000e61000-0x000000e70000 : "support-list" 0x000000e70000-0x000000e80000 : "profile" 0x000000e80000-0x000000e90000 : "default-config" 0x000000e90000-0x000000ee0000 : "user-config" 0x000000ee0000-0x000000fe0000 : "log" 0x000000fe0000-0x000000ff0000 : "radio_bk" 0x000000ff0000-0x000001000000 : "radio" Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20221015092950.27467-2-zajec5@gmail.com
* Merge tag 'mtd/for-6.1' of ↵Linus Torvalds2022-10-071-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "Core MTD changes: - mtdchar: add MEMREAD ioctl - Add ECC error accounting for each read request - always initialize 'stats' in struct mtd_oob_ops - Track maximum number of bitflips for each read request - Fix repeated word in comment - Move from strlcpy with unused retval to strscpy - Fix a typo in a comment - Add binding for U-Boot bootloader partitions MTD device drivers changes: - FTL: use container_of() rather than cast - docg3: - Use correct function names in comment blocks - Check the return value of devm_ioremap() in the probe - physmap-core: Fix NULL pointer dereferencing in of_select_probe_type() - parsers: add Broadcom's U-Boot parser Raw NAND core changes: - Replace of_gpio_named_count() by gpiod_count() - Remove misguided comment of nand_get_device() - bbt: Use the bitmap API to allocate bitmaps Raw NAND controller drivers changes: - Meson: - Stop supporting legacy clocks - Refine resource getting in probe - Convert bindings to yaml - Fix clock handling and update the bindings accordingly - Fix bit map use in meson_nfc_ecc_correct() - bcm47xx: - Fix spelling typo in comment - STM32 FMC2: - Switch to using devm_fwnode_gpiod_get() - Fix dma_map_sg error check - Cadence: - Remove an unneeded result variable - Marvell: - Fix error handle regarding dma_map_sg - Orion: - Use devm_clk_get_optional() - Cafe: - Use correct function name in comment block - Atmel: - Unmap streaming DMA mappings - Arasan: - Stop using 0 as NULL pointer - GPMI: - Fix typo 'the the' in comment - BRCM: - Add individual glue driver selection - Move Kconfig to driver folder - FSL: Fix none ECC mode - Intel: - Use devm_platform_ioremap_resource_byname() - Remove unused clk_rate member from struct ebu_nand - Remove unused nand_pa member from ebu_nand_cs - Don't re-define NAND_DATA_IFACE_CHECK_ONLY - Remove undocumented compatible string - Fix compatible string in the bindings - Read the chip-select line from the correct OF node - Fix maximum chip select value in the bindings" * tag 'mtd/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (43 commits) mtd: rawnand: meson: stop supporting legacy clocks dt-bindings: nand: meson: convert txt to yaml mtd: rawnand: meson: refine resource getting in probe mtd: rawnand: meson: fix the clock dt-bindings: nand: meson: fix meson nfc clock mtd: rawnand: bcm47xx: fix spelling typo in comment mtd: rawnand: stm32_fmc2: switch to using devm_fwnode_gpiod_get() mtd: rawnand: cadence: Remove an unneeded result variable mtd: rawnand: Replace of_gpio_named_count() by gpiod_count() mtd: rawnand: marvell: Fix error handle regarding dma_map_sg mtd: rawnand: stm32_fmc2: Fix dma_map_sg error check mtd: rawnand: remove misguided comment of nand_get_device() mtd: rawnand: orion: Use devm_clk_get_optional() mtd: rawnand: cafe: Use correct function name in comment block mtd: rawnand: atmel: Unmap streaming DMA mappings mtd: rawnand: meson: fix bit map use in meson_nfc_ecc_correct() mtd: rawnand: arasan: stop using 0 as NULL pointer mtd: rawnand: gpmi: Fix typo 'the the' in comment mtd: rawnand: brcmnand: Add individual glue driver selection mtd: rawnand: brcmnand: Move Kconfig to driver folder ...
| * mtd: parsers: add Broadcom's U-Boot parserRafał Miłecki2022-09-191-0/+10
| | | | | | | | | | | | | | | | | | Broadcom stores environment variables blocks inside U-Boot partition itself. This driver finds & registers them. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220711153041.6036-2-zajec5@gmail.com
* | arm64: bcmbca: Make BCM4908 drivers depend on ARCH_BCMBCAWilliam Zhang2022-08-151-3/+3
|/ | | | | | | | | | | | | | With Broadcom Broadband arch ARCH_BCMBCA supported in the kernel, this patch series migrate the ARCH_BCM4908 symbol to ARCH_BCMBCA. Hence replace ARCH_BCM4908 with ARCH_BCMBCA in subsystem Kconfig files. Signed-off-by: William Zhang <william.zhang@broadcom.com> Acked-by: Guenter Roeck <linux@roeck-us.net> (for watchdog) Acked-by: Bjorn Helgaas <bhelgaas@google.com> (for drivers/pci) Acked-by: Wolfram Sang <wsa@kernel.org> (for i2c) Acked-by: Philipp Zabel <p.zabel@pengutronix.de> (for reset) Link: https://lore.kernel.org/r/20220803175455.47638-7-william.zhang@broadcom.com Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* mtd: parsers: add support for Sercomm partitionsMikhail Zhilkin2022-06-091-0/+9
| | | | | | | | | | | | | | | | | This adds an MTD partition parser for the Sercomm partition table that is used in some Beeline, Netgear and Sercomm routers. The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND. Original patch (proposed by NOGUCHI Hiroshi): Link: https://github.com/openwrt/openwrt/pull/1318#issuecomment-420607394 Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220529110714.189732-1-csharper2005@gmail.com
* mtd: parsers: trx: allow to use on MediaTek MIPS SoCsINAGAKI Hiroshi2022-02-181-1/+1
| | | | | | | | | | | | | | | | Buffalo sells some router devices which have trx-formatted firmware, based on MediaTek MIPS SoCs. To use parser_trx on those devices, add "RALINK" to dependency and allow to compile for MediaTek MIPS SoCs. examples: - WCR-1166DS (MT7628) - WSR-1166DHP (MT7621) - WSR-2533DHP (MT7621) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220213064045.1781-1-musashino.open@gmail.com
* mtd: parsers: trx: Allow to use TRX parser on Mediatek SoCsHauke Mehrtens2021-05-101-1/+1
| | | | | | | | Buffalo uses the TRX partition format also on Mediatek MT7622 SoCs. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-4-hauke@hauke-m.de
* mtd: parsers: ofpart: support Linksys Northstar partitionsRafał Miłecki2021-03-281-0/+10
| | | | | | | | | This allows extending ofpart parser with support for Linksys Northstar devices. That support uses recently added quirks mechanism. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210312134919.7767-2-zajec5@gmail.com
* mtd: parsers: ofpart: support BCM4908 fixed partitionsRafał Miłecki2021-03-111-0/+9
| | | | | | | | | | | | | | | | | | Some devices use fixed partitioning with some partitions requiring some extra logic. E.g. BCM4908 may have multiple firmware partitions but detecting currently used one requires checking bootloader parameters. To support such cases without duplicating a lot of code (without copying most of the ofpart.c code) support for post-parsing callback was added. BCM4908 support in ofpart can be enabled using config option and results in compiling & executing a specific callback. It simply reads offset of currently used firmware partition from the DT. Bootloader specifies it using the "brcm_blparms" property. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210301105823.31032-1-zajec5@gmail.com
* mtd: parsers: extend Qcom SMEM parser to SPI flashBaruch Siach2021-03-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qcom MIBIB partition might be stored on SPI flash devices, and the parser works in this case just as well: [ 1.404229] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 [ 1.408078] spi-nor spi0.0: found mx25u6435f, expected n25q128a11 [ 1.415016] spi-nor spi0.0: mx25u6435f (8192 Kbytes) [ 1.420756] 12 qcomsmem partitions found on MTD device spi0.0 [ 1.425739] Creating 12 MTD partitions on "spi0.0": [ 1.431381] 0x000000000000-0x00000000c000 : "0:sbl1" [ 1.437058] 0x00000000c000-0x00000000d000 : "0:mibib" [ 1.442143] 0x00000000d000-0x000000027000 : "0:qsee" [ 1.447057] 0x000000027000-0x000000028000 : "0:devcfg" [ 1.452088] 0x000000028000-0x00000002a000 : "0:rpm" [ 1.457065] 0x00000002a000-0x00000002b000 : "0:cdt" [ 1.461832] 0x00000002b000-0x00000002c000 : "0:appsblenv" [ 1.466736] 0x00000002c000-0x000000036000 : "0:appsbl" [ 1.472248] 0x000000036000-0x00000003a000 : "0:art" [ 1.477297] 0x00000003a000-0x00000003e000 : "config" [ 1.482047] 0x00000003e000-0x00000004e000 : "data" [ 1.487257] 0x00000004e000-0x000000200000 : "0:hlos" Remove dependency on MTD_NAND_QCOM. Update the Kconfig prompt and help text accordingly. Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/7f558e888a41c5b1fd4ca0427b3976531c51a876.1614080824.git.baruch@tkos.co.il
* mtd: parsers: Add Qcom SMEM parserManivannan Sadhasivam2021-01-041-0/+8
| | | | | | | | | | NAND based Qualcomm platforms have the partition table populated in the Shared Memory (SMEM). Hence, add a parser for parsing the partitions from it. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210104041137.113075-3-manivannan.sadhasivam@linaro.org
* mtd: parsers: bcm63xx: Do not make it modularFlorian Fainelli2020-10-021-1/+1
| | | | | | | | | | | | | | | | With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection"), we generate a reference to fw_arg3 which is the fourth firmware/command line argument on MIPS platforms. That symbol is not exported and would cause a linking failure. The parser is typically necessary to boot a BCM63xx-based system anyway so having it be part of the kernel image makes sense, therefore make it 'bool' instead of 'tristate'. Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200929172726.30469-1-f.fainelli@gmail.com
* mtd: parsers: Move CMDLINE parserLinus Walleij2019-09-151-0/+37
| | | | | | | | This moves the CMDLINE partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: parsers: Move OF parserLinus Walleij2019-09-151-0/+10
| | | | | | | | This moves the OF/device tree partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: parsers: Move BCM63xx parserLinus Walleij2019-09-151-0/+9
| | | | | | | | This moves the BCM63xx partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: parsers: Move BCM47xx parserLinus Walleij2019-09-151-0/+7
| | | | | | | | This moves the BCM47xx partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: parsers: Move TI AR7 parserLinus Walleij2019-09-151-0/+5
| | | | | | | | This moves the TI AR7 partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mtd: afs: Move AFS partition parser to parsers subdirLinus Walleij2019-05-061-0/+16
| | | | | | | | This moves the AFS (ARM Firmware Suite) partition parser for NOR flash down into the parsers subdirectory. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: bcm63xxpart: move imagetag parsing to its own parserJonas Gorski2019-05-061-0/+11
| | | | | | | | | | | | | Move the bcm963xx Image Tag parsing into its own partition parser. This Allows reusing the parser with different full flash parsers. While moving it, rename it to bcm963* to better reflect it isn't chip, but reference implementation specific. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: Move Redboot partition parserLinus Walleij2018-11-121-0/+50
| | | | | | | | This moves the Redboot partition parser down to the parsers subdirectory. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
* mtd: sharpslpart: Add sharpslpart partition parserAndrea Adami2017-11-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Sharp SL Series (Zaurus) PXA handhelds have 16/64/128M of NAND flash and share the same layout of the first 7M partition, managed by Sharp FTL. GPL 2.4 sources: http://support.ezaurus.com/developer/source/source_dl.asp The purpose of this self-contained patch is to add a common parser and remove the hardcoded sizes in the board files (these devices are not yet converted to devicetree). Users will have benefits because the mtdparts= tag will not be necessary anymore and they will be free to repartition the little sized flash. The obsolete bootloader can not pass the partitioning info to modern kernels anymore so it has to be read from flash at known logical addresses. (see http://www.h5.dion.ne.jp/~rimemoon/zaurus/memo_006.htm ) In kernel, under arch/arm/mach-pxa we have already 8 machines: MACH_POODLE, MACH_CORGI, MACH_SHEPERD, MACH_HUSKY, MACH_AKITA, MACH_SPITZ, MACH_BORZOI, MACH_TOSA. Lost after the 2.4 vendor kernel are MACH_BOXER and MACH_TERRIER. Almost every model has different factory partitioning: add to this the units can be repartitioned by users with userspace tools (nandlogical) and installers for popular (back then) linux distributions. The Parameter Area in the first (boot) partition extends from 0x00040000 to 0x0007bfff (176k) and contains two copies of the partition table: ... 0x00060000: Partition Info1 16k 0x00064000: Partition Info2 16k 0x00668000: Model 16k ... The first 7M partition is managed by the Sharp FTL reserving 5% + 1 blocks for wear-leveling: some blocks are remapped and one layer of translation (logical to physical) is necessary. There isn't much documentation about this FTL in the 2.4 sources, just the MTD methods for reading and writing using logical addresses and the block management (wear-leveling, use counter). It seems this FTL was tailored with 16KiB eraesize in mind so to fit one param block exactly, to have two copies of the partition table on two blocks. Later pxa27x devices have same size but 128KiB erasesize and less blocks (56 vs. 448) but the same schema was adopted, even if the two tables are now in the same eraseblock. For the purpose of the MTD parser only the read part of the code was taken. The NAND drivers that can use this parser are sharpsl.c and tmio_nand.c. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at>
* mtd: extract TRX parser out of bcm47xxpart into a separated moduleRafał Miłecki2017-06-221-0/+8
This makes TRX parsing code reusable with other platforms and parsers. Please note this patch doesn't really change anything in the existing code, just moves it. There is still some place for improvement (e.g. working on non-hacky method of checking rootfs format) but it's not really a subject of this change. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Brian Norris <computersforpeace@gmail.com>