Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 1 | menuconfig MTD |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | tristate "Memory Technology Device (MTD) support" |
Alban Bedel | c4dfa25 | 2018-11-13 15:01:10 +0100 | [diff] [blame] | 3 | imply NVMEM |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | help |
| 5 | Memory Technology Devices are flash, RAM and similar chips, often |
| 6 | used for solid state file systems on embedded devices. This option |
| 7 | will provide the generic support for MTD drivers to register |
| 8 | themselves with the kernel and for potential users of MTD devices |
| 9 | to enumerate the devices which are present and obtain a handle on |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 10 | them. It will also allow you to select individual drivers for |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | particular hardware and users of MTD devices. If unsure, say N. |
| 12 | |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 13 | if MTD |
| 14 | |
Mike Frysinger | 80f53da | 2009-06-13 06:15:18 -0400 | [diff] [blame] | 15 | config MTD_TESTS |
Wolfram Sang | 48e546b | 2011-10-30 17:28:49 +0100 | [diff] [blame] | 16 | tristate "MTD tests support (DANGEROUS)" |
Mike Frysinger | 80f53da | 2009-06-13 06:15:18 -0400 | [diff] [blame] | 17 | depends on m |
| 18 | help |
| 19 | This option includes various MTD tests into compilation. The tests |
| 20 | should normally be compiled as kernel modules. The modules perform |
| 21 | various checks and verifications when loaded. |
| 22 | |
Wolfram Sang | 48e546b | 2011-10-30 17:28:49 +0100 | [diff] [blame] | 23 | WARNING: some of the tests will ERASE entire MTD device which they |
| 24 | test. Do not use these tests unless you really know what you do. |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | config MTD_CMDLINE_PARTS |
Lubomir Rintel | f5f172d | 2013-01-16 02:12:49 +0100 | [diff] [blame] | 27 | tristate "Command line partition table parsing" |
| 28 | depends on MTD |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 29 | help |
Egry Gábor | 4992a9e | 2006-05-12 17:35:02 +0100 | [diff] [blame] | 30 | Allow generic configuration of the MTD partition tables via the kernel |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | command line. Multiple flash resources are supported for hardware where |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 32 | different kinds of flash memory are available. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | You will still need the parsing functions to be called by the driver |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 35 | for your particular device. It won't happen automatically. The |
| 36 | SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | example. |
| 38 | |
| 39 | The format for the command line is as follows: |
| 40 | |
| 41 | mtdparts=<mtddef>[;<mtddef] |
| 42 | <mtddef> := <mtd-id>:<partdef>[,<partdef>] |
| 43 | <partdef> := <size>[@offset][<name>][ro] |
| 44 | <mtd-id> := unique id used in mapping driver/device |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 45 | <size> := standard linux memsize OR "-" to denote all |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | remaining space |
| 47 | <name> := (NAME) |
| 48 | |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 49 | Due to the way Linux handles the command line, no spaces are |
| 50 | allowed in the partition definition, including mtd id's and partition |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | names. |
| 52 | |
| 53 | Examples: |
| 54 | |
| 55 | 1 flash resource (mtd-id "sa1100"), with 1 single writable partition: |
| 56 | mtdparts=sa1100:- |
| 57 | |
| 58 | Same flash, but 2 named partitions, the first one being read-only: |
| 59 | mtdparts=sa1100:256k(ARMboot)ro,-(root) |
| 60 | |
| 61 | If unsure, say 'N'. |
| 62 | |
Scott Wood | 9a310d2 | 2008-01-15 17:54:43 -0600 | [diff] [blame] | 63 | config MTD_OF_PARTS |
Dmitry Eremin-Solenikov | d6137ba | 2011-06-27 01:02:59 +0400 | [diff] [blame] | 64 | tristate "OpenFirmware partitioning information support" |
Frank Svendsboe | 2e929d0 | 2012-05-17 22:43:09 +0200 | [diff] [blame] | 65 | default y |
Grant Likely | b7b6e08 | 2010-10-30 07:35:02 +0100 | [diff] [blame] | 66 | depends on OF |
Scott Wood | 9a310d2 | 2008-01-15 17:54:43 -0600 | [diff] [blame] | 67 | help |
| 68 | This provides a partition parsing function which derives |
| 69 | the partition map from the children of the flash node, |
Michal Sojka | e760644 | 2014-10-10 15:06:17 +0200 | [diff] [blame] | 70 | as described in Documentation/devicetree/bindings/mtd/partition.txt. |
Scott Wood | 9a310d2 | 2008-01-15 17:54:43 -0600 | [diff] [blame] | 71 | |
Matteo Croce | f079788 | 2008-03-12 02:25:06 +0100 | [diff] [blame] | 72 | config MTD_AR7_PARTS |
| 73 | tristate "TI AR7 partitioning support" |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 74 | help |
Matteo Croce | f079788 | 2008-03-12 02:25:06 +0100 | [diff] [blame] | 75 | TI AR7 partitioning support |
| 76 | |
Jonas Gorski | 70a3c16 | 2011-12-05 16:08:08 +0100 | [diff] [blame] | 77 | config MTD_BCM63XX_PARTS |
| 78 | tristate "BCM63XX CFE partitioning support" |
Simon Arlott | 436e94a6 | 2015-12-13 22:49:26 +0000 | [diff] [blame] | 79 | depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST |
Jonas Gorski | 70a3c16 | 2011-12-05 16:08:08 +0100 | [diff] [blame] | 80 | select CRC32 |
Jonas Gorski | dd84cb0 | 2019-03-28 15:19:08 +0100 | [diff] [blame] | 81 | select MTD_PARSER_IMAGETAG |
Jonas Gorski | 70a3c16 | 2011-12-05 16:08:08 +0100 | [diff] [blame] | 82 | help |
Colin Ian King | 81d9e98 | 2018-09-11 13:42:34 +0100 | [diff] [blame] | 83 | This provides partition parsing for BCM63xx devices with CFE |
Jonas Gorski | 70a3c16 | 2011-12-05 16:08:08 +0100 | [diff] [blame] | 84 | bootloaders. |
| 85 | |
Rafał Miłecki | 3cf7f13 | 2012-08-30 07:41:16 +0200 | [diff] [blame] | 86 | config MTD_BCM47XX_PARTS |
| 87 | tristate "BCM47XX partitioning support" |
Rafał Miłecki | 9e3afa5 | 2014-02-28 18:02:01 +0100 | [diff] [blame] | 88 | depends on BCM47XX || ARCH_BCM_5301X |
Rafał Miłecki | 3cf7f13 | 2012-08-30 07:41:16 +0200 | [diff] [blame] | 89 | help |
| 90 | This provides partitions parser for devices based on BCM47xx |
| 91 | boards. |
| 92 | |
Rafał Miłecki | 99352af | 2017-06-21 08:26:47 +0200 | [diff] [blame] | 93 | menu "Partition parsers" |
| 94 | source "drivers/mtd/parsers/Kconfig" |
| 95 | endmenu |
| 96 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | comment "User Modules And Translation Layers" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | |
Ezequiel Garcia | 7f11b4d | 2013-12-13 10:58:44 -0300 | [diff] [blame] | 99 | # |
| 100 | # MTD block device support is select'ed if needed |
| 101 | # |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 102 | config MTD_BLKDEVS |
Ezequiel Garcia | 7f11b4d | 2013-12-13 10:58:44 -0300 | [diff] [blame] | 103 | tristate |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 104 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | config MTD_BLOCK |
| 106 | tristate "Caching block device access to MTD devices" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 107 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 108 | select MTD_BLKDEVS |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 109 | help |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | Although most flash chips have an erase size too large to be useful |
| 111 | as block devices, it is possible to use MTD devices which are based |
| 112 | on RAM chips in this manner. This block device is a user of MTD |
| 113 | devices performing that function. |
| 114 | |
| 115 | At the moment, it is also required for the Journalling Flash File |
| 116 | System(s) to obtain a handle on the MTD device when it's mounted |
| 117 | (although JFFS and JFFS2 don't actually use any of the functionality |
| 118 | of the mtdblock device). |
| 119 | |
| 120 | Later, it may be extended to perform read/erase/modify/write cycles |
| 121 | on flash chips to emulate a smaller block size. Needless to say, |
| 122 | this is very unsafe, but could be useful for file systems which are |
| 123 | almost never written to. |
| 124 | |
| 125 | You do not need this option for use with the DiskOnChip devices. For |
| 126 | those, enable NFTL support (CONFIG_NFTL) instead. |
| 127 | |
| 128 | config MTD_BLOCK_RO |
| 129 | tristate "Readonly block device access to MTD devices" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 130 | depends on MTD_BLOCK!=y && BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 131 | select MTD_BLKDEVS |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | help |
| 133 | This allows you to mount read-only file systems (such as cramfs) |
| 134 | from an MTD device, without the overhead (and danger) of the caching |
| 135 | driver. |
| 136 | |
| 137 | You do not need this option for use with the DiskOnChip devices. For |
| 138 | those, enable NFTL support (CONFIG_NFTL) instead. |
| 139 | |
| 140 | config FTL |
| 141 | tristate "FTL (Flash Translation Layer) support" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 142 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 143 | select MTD_BLKDEVS |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 144 | help |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | This provides support for the original Flash Translation Layer which |
| 146 | is part of the PCMCIA specification. It uses a kind of pseudo- |
| 147 | file system on a flash device to emulate a block device with |
| 148 | 512-byte sectors, on top of which you put a 'normal' file system. |
| 149 | |
| 150 | You may find that the algorithms used in this code are patented |
| 151 | unless you live in the Free World where software patents aren't |
| 152 | legal - in the USA you are only permitted to use this on PCMCIA |
| 153 | hardware, although under the terms of the GPL you're obviously |
| 154 | permitted to copy, modify and distribute the code as you wish. Just |
| 155 | not use it. |
| 156 | |
| 157 | config NFTL |
| 158 | tristate "NFTL (NAND Flash Translation Layer) support" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 159 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 160 | select MTD_BLKDEVS |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 161 | help |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | This provides support for the NAND Flash Translation Layer which is |
| 163 | used on M-Systems' DiskOnChip devices. It uses a kind of pseudo- |
| 164 | file system on a flash device to emulate a block device with |
| 165 | 512-byte sectors, on top of which you put a 'normal' file system. |
| 166 | |
| 167 | You may find that the algorithms used in this code are patented |
| 168 | unless you live in the Free World where software patents aren't |
| 169 | legal - in the USA you are only permitted to use this on DiskOnChip |
| 170 | hardware, although under the terms of the GPL you're obviously |
| 171 | permitted to copy, modify and distribute the code as you wish. Just |
| 172 | not use it. |
| 173 | |
| 174 | config NFTL_RW |
| 175 | bool "Write support for NFTL" |
| 176 | depends on NFTL |
| 177 | help |
| 178 | Support for writing to the NAND Flash Translation Layer, as used |
| 179 | on the DiskOnChip. |
| 180 | |
| 181 | config INFTL |
| 182 | tristate "INFTL (Inverse NAND Flash Translation Layer) support" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 183 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 184 | select MTD_BLKDEVS |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 185 | help |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 186 | This provides support for the Inverse NAND Flash Translation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | Layer which is used on M-Systems' newer DiskOnChip devices. It |
| 188 | uses a kind of pseudo-file system on a flash device to emulate |
| 189 | a block device with 512-byte sectors, on top of which you put |
| 190 | a 'normal' file system. |
| 191 | |
| 192 | You may find that the algorithms used in this code are patented |
| 193 | unless you live in the Free World where software patents aren't |
| 194 | legal - in the USA you are only permitted to use this on DiskOnChip |
| 195 | hardware, although under the terms of the GPL you're obviously |
| 196 | permitted to copy, modify and distribute the code as you wish. Just |
| 197 | not use it. |
| 198 | |
Sean Young | e27a996 | 2005-06-16 09:49:33 +0100 | [diff] [blame] | 199 | config RFD_FTL |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 200 | tristate "Resident Flash Disk (Flash Translation Layer) support" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 201 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 202 | select MTD_BLKDEVS |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 203 | help |
Thomas Gleixner | 97894cd | 2005-11-07 11:15:26 +0000 | [diff] [blame] | 204 | This provides support for the flash translation layer known |
| 205 | as the Resident Flash Disk (RFD), as used by the Embedded BIOS |
Kyungmin Park | cd5f634 | 2005-07-11 11:41:53 +0100 | [diff] [blame] | 206 | of General Software. There is a blurb at: |
| 207 | |
| 208 | http://www.gensw.com/pages/prod/bios/rfd.htm |
Sean Young | e27a996 | 2005-06-16 09:49:33 +0100 | [diff] [blame] | 209 | |
Claudio Lanconelli | 51197ab | 2006-09-22 11:01:37 +0100 | [diff] [blame] | 210 | config SSFDC |
David Woodhouse | 892e4fb | 2006-09-23 10:24:36 +0100 | [diff] [blame] | 211 | tristate "NAND SSFDC (SmartMedia) read only translation layer" |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 212 | depends on BLOCK |
Josh Boyer | f6a7ecb | 2006-11-20 20:15:36 -0600 | [diff] [blame] | 213 | select MTD_BLKDEVS |
Claudio Lanconelli | 51197ab | 2006-09-22 11:01:37 +0100 | [diff] [blame] | 214 | help |
| 215 | This enables read only access to SmartMedia formatted NAND |
| 216 | flash. You can mount it with FAT file system. |
| 217 | |
Maxim Levitsky | 7d17c02 | 2010-02-22 20:39:41 +0200 | [diff] [blame] | 218 | config SM_FTL |
| 219 | tristate "SmartMedia/xD new translation layer" |
Kees Cook | 6372680 | 2012-10-02 11:17:47 -0700 | [diff] [blame] | 220 | depends on BLOCK |
Maxim Levitsky | 7d17c02 | 2010-02-22 20:39:41 +0200 | [diff] [blame] | 221 | select MTD_BLKDEVS |
Miquel Raynal | 9bb9464 | 2019-02-08 08:48:37 +0100 | [diff] [blame] | 222 | select MTD_NAND_ECC_SW_HAMMING |
Maxim Levitsky | 7d17c02 | 2010-02-22 20:39:41 +0200 | [diff] [blame] | 223 | help |
Maxim Levitsky | 6f92355 | 2010-07-28 18:53:17 +0300 | [diff] [blame] | 224 | This enables EXPERIMENTAL R/W support for SmartMedia/xD |
David Woodhouse | 7de6f79 | 2010-03-08 18:45:00 -0800 | [diff] [blame] | 225 | FTL (Flash translation layer). |
Maxim Levitsky | 6f92355 | 2010-07-28 18:53:17 +0300 | [diff] [blame] | 226 | Write support is only lightly tested, therefore this driver |
| 227 | isn't recommended to use with valuable data (anyway if you have |
| 228 | valuable data, do backups regardless of software/hardware you |
| 229 | use, because you never know what will eat your data...) |
| 230 | If you only need R/O access, you can use older R/O driver |
| 231 | (CONFIG_SSFDC) |
Maxim Levitsky | 7d17c02 | 2010-02-22 20:39:41 +0200 | [diff] [blame] | 232 | |
Richard Purdie | 4b23aff | 2007-05-29 13:31:42 +0100 | [diff] [blame] | 233 | config MTD_OOPS |
| 234 | tristate "Log panic/oops to an MTD buffer" |
Richard Purdie | 4b23aff | 2007-05-29 13:31:42 +0100 | [diff] [blame] | 235 | help |
| 236 | This enables panic and oops messages to be logged to a circular |
| 237 | buffer in a flash partition where it can be read back at some |
| 238 | later point. |
| 239 | |
Jarkko Lavinen | a321590 | 2011-02-14 16:16:11 +0200 | [diff] [blame] | 240 | config MTD_SWAP |
| 241 | tristate "Swap on MTD device support" |
| 242 | depends on MTD && SWAP |
| 243 | select MTD_BLKDEVS |
| 244 | help |
| 245 | Provides volatile block device driver on top of mtd partition |
Boris Brezillon | a8222a8 | 2018-07-18 17:09:52 +0200 | [diff] [blame] | 246 | suitable for swapping. The mapping of written blocks is not saved. |
Jarkko Lavinen | a321590 | 2011-02-14 16:16:11 +0200 | [diff] [blame] | 247 | The driver provides wear leveling by storing erase counter into the |
| 248 | OOB. |
| 249 | |
Dan Ehrenberg | 727dc61 | 2015-04-02 15:15:10 -0700 | [diff] [blame] | 250 | config MTD_PARTITIONED_MASTER |
| 251 | bool "Retain master device when partitioned" |
| 252 | default n |
| 253 | depends on MTD |
| 254 | help |
| 255 | For historical reasons, by default, either a master is present or |
| 256 | several partitions are present, but not both. The concern was that |
| 257 | data listed in multiple partitions was dangerous; however, SCSI does |
| 258 | this and it is frequently useful for applications. This config option |
| 259 | leaves the master in even if the device is partitioned. It also makes |
| 260 | the parent of the partition device be the master device, rather than |
| 261 | what lies behind the master. |
| 262 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | source "drivers/mtd/chips/Kconfig" |
| 264 | |
| 265 | source "drivers/mtd/maps/Kconfig" |
| 266 | |
| 267 | source "drivers/mtd/devices/Kconfig" |
| 268 | |
| 269 | source "drivers/mtd/nand/Kconfig" |
| 270 | |
Alexey Korolev | 60f2652 | 2008-12-16 18:24:14 +0000 | [diff] [blame] | 271 | source "drivers/mtd/lpddr/Kconfig" |
| 272 | |
Huang Shijie | b199489 | 2014-02-24 18:37:37 +0800 | [diff] [blame] | 273 | source "drivers/mtd/spi-nor/Kconfig" |
| 274 | |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 275 | source "drivers/mtd/ubi/Kconfig" |
| 276 | |
Vignesh Raghavendra | dcc7d34 | 2019-06-25 13:27:44 +0530 | [diff] [blame^] | 277 | source "drivers/mtd/hyperbus/Kconfig" |
| 278 | |
Jan Engelhardt | ec98c68 | 2007-04-19 16:21:41 -0500 | [diff] [blame] | 279 | endif # MTD |