xref: /linux/drivers/mtd/Kconfig (revision 99352afe8f169c95b294b6b9a8d0e18cd9e3c2a0)
1ec98c681SJan Engelhardtmenuconfig MTD
21da177e4SLinus Torvalds	tristate "Memory Technology Device (MTD) support"
39310da0bSRichard Weinberger	depends on GENERIC_IO
41da177e4SLinus Torvalds	help
51da177e4SLinus Torvalds	  Memory Technology Devices are flash, RAM and similar chips, often
61da177e4SLinus Torvalds	  used for solid state file systems on embedded devices. This option
71da177e4SLinus Torvalds	  will provide the generic support for MTD drivers to register
81da177e4SLinus Torvalds	  themselves with the kernel and for potential users of MTD devices
91da177e4SLinus Torvalds	  to enumerate the devices which are present and obtain a handle on
101da177e4SLinus Torvalds	  them. It will also allow you to select individual drivers for
111da177e4SLinus Torvalds	  particular hardware and users of MTD devices. If unsure, say N.
121da177e4SLinus Torvalds
13ec98c681SJan Engelhardtif MTD
14ec98c681SJan Engelhardt
1580f53da0SMike Frysingerconfig MTD_TESTS
1648e546b7SWolfram Sang	tristate "MTD tests support (DANGEROUS)"
1780f53da0SMike Frysinger	depends on m
1880f53da0SMike Frysinger	help
1980f53da0SMike Frysinger	  This option includes various MTD tests into compilation. The tests
2080f53da0SMike Frysinger	  should normally be compiled as kernel modules. The modules perform
2180f53da0SMike Frysinger	  various checks and verifications when loaded.
2280f53da0SMike Frysinger
2348e546b7SWolfram Sang	  WARNING: some of the tests will ERASE entire MTD device which they
2448e546b7SWolfram Sang	  test. Do not use these tests unless you really know what you do.
2548e546b7SWolfram Sang
261da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS
271da177e4SLinus Torvalds	tristate "RedBoot partition table parsing"
281da177e4SLinus Torvalds	---help---
291da177e4SLinus Torvalds	  RedBoot is a ROM monitor and bootloader which deals with multiple
301da177e4SLinus Torvalds	  'images' in flash devices by putting a table one of the erase
311da177e4SLinus Torvalds	  blocks on the device, similar to a partition table, which gives
321da177e4SLinus Torvalds	  the offsets, lengths and names of all the images stored in the
331da177e4SLinus Torvalds	  flash.
341da177e4SLinus Torvalds
351da177e4SLinus Torvalds	  If you need code which can detect and parse this table, and register
361da177e4SLinus Torvalds	  MTD 'partitions' corresponding to each image in the table, enable
371da177e4SLinus Torvalds	  this option.
381da177e4SLinus Torvalds
391da177e4SLinus Torvalds	  You will still need the parsing functions to be called by the driver
401da177e4SLinus Torvalds	  for your particular device. It won't happen automatically. The
411da177e4SLinus Torvalds	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
421da177e4SLinus Torvalds	  example.
431da177e4SLinus Torvalds
44b7b6e08fSGrant Likelyif MTD_REDBOOT_PARTS
45b7b6e08fSGrant Likely
461da177e4SLinus Torvaldsconfig MTD_REDBOOT_DIRECTORY_BLOCK
471da177e4SLinus Torvalds	int "Location of RedBoot partition table"
481da177e4SLinus Torvalds	default "-1"
491da177e4SLinus Torvalds	---help---
501da177e4SLinus Torvalds	  This option is the Linux counterpart to the
511da177e4SLinus Torvalds	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
521da177e4SLinus Torvalds	  option.
531da177e4SLinus Torvalds
541da177e4SLinus Torvalds	  The option specifies which Flash sectors holds the RedBoot
554992a9e8SEgry Gábor	  partition table.  A zero or positive value gives an absolute
561da177e4SLinus Torvalds	  erase block number. A negative value specifies a number of
571da177e4SLinus Torvalds	  sectors before the end of the device.
581da177e4SLinus Torvalds
591da177e4SLinus Torvalds	  For example "2" means block number 2, "-1" means the last
601da177e4SLinus Torvalds	  block and "-2" means the penultimate block.
611da177e4SLinus Torvalds
621da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS_UNALLOCATED
631da177e4SLinus Torvalds	bool "Include unallocated flash regions"
641da177e4SLinus Torvalds	help
651da177e4SLinus Torvalds	  If you need to register each unallocated flash region as a MTD
661da177e4SLinus Torvalds	  'partition', enable this option.
671da177e4SLinus Torvalds
681da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS_READONLY
691da177e4SLinus Torvalds	bool "Force read-only for RedBoot system images"
701da177e4SLinus Torvalds	help
711da177e4SLinus Torvalds	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
721da177e4SLinus Torvalds	  'FIS directory' images, enable this option.
731da177e4SLinus Torvalds
74b7b6e08fSGrant Likelyendif # MTD_REDBOOT_PARTS
75b7b6e08fSGrant Likely
761da177e4SLinus Torvaldsconfig MTD_CMDLINE_PARTS
77f5f172dcSLubomir Rintel	tristate "Command line partition table parsing"
78f5f172dcSLubomir Rintel	depends on MTD
791da177e4SLinus Torvalds	---help---
804992a9e8SEgry Gábor	  Allow generic configuration of the MTD partition tables via the kernel
811da177e4SLinus Torvalds	  command line. Multiple flash resources are supported for hardware where
821da177e4SLinus Torvalds	  different kinds of flash memory are available.
831da177e4SLinus Torvalds
841da177e4SLinus Torvalds	  You will still need the parsing functions to be called by the driver
851da177e4SLinus Torvalds	  for your particular device. It won't happen automatically. The
861da177e4SLinus Torvalds	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
871da177e4SLinus Torvalds	  example.
881da177e4SLinus Torvalds
891da177e4SLinus Torvalds	  The format for the command line is as follows:
901da177e4SLinus Torvalds
911da177e4SLinus Torvalds	  mtdparts=<mtddef>[;<mtddef]
921da177e4SLinus Torvalds	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
931da177e4SLinus Torvalds	  <partdef> := <size>[@offset][<name>][ro]
941da177e4SLinus Torvalds	  <mtd-id>  := unique id used in mapping driver/device
951da177e4SLinus Torvalds	  <size>    := standard linux memsize OR "-" to denote all
961da177e4SLinus Torvalds	  remaining space
971da177e4SLinus Torvalds	  <name>    := (NAME)
981da177e4SLinus Torvalds
991da177e4SLinus Torvalds	  Due to the way Linux handles the command line, no spaces are
1001da177e4SLinus Torvalds	  allowed in the partition definition, including mtd id's and partition
1011da177e4SLinus Torvalds	  names.
1021da177e4SLinus Torvalds
1031da177e4SLinus Torvalds	  Examples:
1041da177e4SLinus Torvalds
1051da177e4SLinus Torvalds	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
1061da177e4SLinus Torvalds	  mtdparts=sa1100:-
1071da177e4SLinus Torvalds
1081da177e4SLinus Torvalds	  Same flash, but 2 named partitions, the first one being read-only:
1091da177e4SLinus Torvalds	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
1101da177e4SLinus Torvalds
1111da177e4SLinus Torvalds	  If unsure, say 'N'.
1121da177e4SLinus Torvalds
1131da177e4SLinus Torvaldsconfig MTD_AFS_PARTS
1141da177e4SLinus Torvalds	tristate "ARM Firmware Suite partition parsing"
1158cf98018SLinus Walleij	depends on (ARM || ARM64)
1161da177e4SLinus Torvalds	---help---
1171da177e4SLinus Torvalds	  The ARM Firmware Suite allows the user to divide flash devices into
1181da177e4SLinus Torvalds	  multiple 'images'. Each such image has a header containing its name
1191da177e4SLinus Torvalds	  and offset/size etc.
1201da177e4SLinus Torvalds
1211da177e4SLinus Torvalds	  If you need code which can detect and parse these tables, and
1221da177e4SLinus Torvalds	  register MTD 'partitions' corresponding to each image detected,
1231da177e4SLinus Torvalds	  enable this option.
1241da177e4SLinus Torvalds
1251da177e4SLinus Torvalds	  You will still need the parsing functions to be called by the driver
1261da177e4SLinus Torvalds	  for your particular device. It won't happen automatically. The
127adf00400SMarc Zyngier	  'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
1281da177e4SLinus Torvalds
1299a310d21SScott Woodconfig MTD_OF_PARTS
130d6137badSDmitry Eremin-Solenikov	tristate "OpenFirmware partitioning information support"
1312e929d00SFrank Svendsboe	default y
132b7b6e08fSGrant Likely	depends on OF
1339a310d21SScott Wood	help
1349a310d21SScott Wood	  This provides a partition parsing function which derives
1359a310d21SScott Wood	  the partition map from the children of the flash node,
136e7606446SMichal Sojka	  as described in Documentation/devicetree/bindings/mtd/partition.txt.
1379a310d21SScott Wood
138f0797881SMatteo Croceconfig MTD_AR7_PARTS
139f0797881SMatteo Croce	tristate "TI AR7 partitioning support"
140f0797881SMatteo Croce	---help---
141f0797881SMatteo Croce	  TI AR7 partitioning support
142f0797881SMatteo Croce
14370a3c167SJonas Gorskiconfig MTD_BCM63XX_PARTS
14470a3c167SJonas Gorski	tristate "BCM63XX CFE partitioning support"
145436e94a6SSimon Arlott	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
14670a3c167SJonas Gorski	select CRC32
14770a3c167SJonas Gorski	help
14870a3c167SJonas Gorski	  This provides partions parsing for BCM63xx devices with CFE
14970a3c167SJonas Gorski	  bootloaders.
15070a3c167SJonas Gorski
1513cf7f131SRafał Miłeckiconfig MTD_BCM47XX_PARTS
1523cf7f131SRafał Miłecki	tristate "BCM47XX partitioning support"
1539e3afa5fSRafał Miłecki	depends on BCM47XX || ARCH_BCM_5301X
1543cf7f131SRafał Miłecki	help
1553cf7f131SRafał Miłecki	  This provides partitions parser for devices based on BCM47xx
1563cf7f131SRafał Miłecki	  boards.
1573cf7f131SRafał Miłecki
158*99352afeSRafał Miłeckimenu "Partition parsers"
159*99352afeSRafał Miłeckisource "drivers/mtd/parsers/Kconfig"
160*99352afeSRafał Miłeckiendmenu
161*99352afeSRafał Miłecki
1621da177e4SLinus Torvaldscomment "User Modules And Translation Layers"
1631da177e4SLinus Torvalds
1647f11b4d4SEzequiel Garcia#
1657f11b4d4SEzequiel Garcia# MTD block device support is select'ed if needed
1667f11b4d4SEzequiel Garcia#
167f6a7ecb1SJosh Boyerconfig MTD_BLKDEVS
1687f11b4d4SEzequiel Garcia	tristate
169f6a7ecb1SJosh Boyer
1701da177e4SLinus Torvaldsconfig MTD_BLOCK
1711da177e4SLinus Torvalds	tristate "Caching block device access to MTD devices"
172ec98c681SJan Engelhardt	depends on BLOCK
173f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
1741da177e4SLinus Torvalds	---help---
1751da177e4SLinus Torvalds	  Although most flash chips have an erase size too large to be useful
1761da177e4SLinus Torvalds	  as block devices, it is possible to use MTD devices which are based
1771da177e4SLinus Torvalds	  on RAM chips in this manner. This block device is a user of MTD
1781da177e4SLinus Torvalds	  devices performing that function.
1791da177e4SLinus Torvalds
1801da177e4SLinus Torvalds	  At the moment, it is also required for the Journalling Flash File
1811da177e4SLinus Torvalds	  System(s) to obtain a handle on the MTD device when it's mounted
1821da177e4SLinus Torvalds	  (although JFFS and JFFS2 don't actually use any of the functionality
1831da177e4SLinus Torvalds	  of the mtdblock device).
1841da177e4SLinus Torvalds
1851da177e4SLinus Torvalds	  Later, it may be extended to perform read/erase/modify/write cycles
1861da177e4SLinus Torvalds	  on flash chips to emulate a smaller block size. Needless to say,
1871da177e4SLinus Torvalds	  this is very unsafe, but could be useful for file systems which are
1881da177e4SLinus Torvalds	  almost never written to.
1891da177e4SLinus Torvalds
1901da177e4SLinus Torvalds	  You do not need this option for use with the DiskOnChip devices. For
1911da177e4SLinus Torvalds	  those, enable NFTL support (CONFIG_NFTL) instead.
1921da177e4SLinus Torvalds
1931da177e4SLinus Torvaldsconfig MTD_BLOCK_RO
1941da177e4SLinus Torvalds	tristate "Readonly block device access to MTD devices"
195ec98c681SJan Engelhardt	depends on MTD_BLOCK!=y && BLOCK
196f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
1971da177e4SLinus Torvalds	help
1981da177e4SLinus Torvalds	  This allows you to mount read-only file systems (such as cramfs)
1991da177e4SLinus Torvalds	  from an MTD device, without the overhead (and danger) of the caching
2001da177e4SLinus Torvalds	  driver.
2011da177e4SLinus Torvalds
2021da177e4SLinus Torvalds	  You do not need this option for use with the DiskOnChip devices. For
2031da177e4SLinus Torvalds	  those, enable NFTL support (CONFIG_NFTL) instead.
2041da177e4SLinus Torvalds
2051da177e4SLinus Torvaldsconfig FTL
2061da177e4SLinus Torvalds	tristate "FTL (Flash Translation Layer) support"
207ec98c681SJan Engelhardt	depends on BLOCK
208f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
2091da177e4SLinus Torvalds	---help---
2101da177e4SLinus Torvalds	  This provides support for the original Flash Translation Layer which
2111da177e4SLinus Torvalds	  is part of the PCMCIA specification. It uses a kind of pseudo-
2121da177e4SLinus Torvalds	  file system on a flash device to emulate a block device with
2131da177e4SLinus Torvalds	  512-byte sectors, on top of which you put a 'normal' file system.
2141da177e4SLinus Torvalds
2151da177e4SLinus Torvalds	  You may find that the algorithms used in this code are patented
2161da177e4SLinus Torvalds	  unless you live in the Free World where software patents aren't
2171da177e4SLinus Torvalds	  legal - in the USA you are only permitted to use this on PCMCIA
2181da177e4SLinus Torvalds	  hardware, although under the terms of the GPL you're obviously
2191da177e4SLinus Torvalds	  permitted to copy, modify and distribute the code as you wish. Just
2201da177e4SLinus Torvalds	  not use it.
2211da177e4SLinus Torvalds
2221da177e4SLinus Torvaldsconfig NFTL
2231da177e4SLinus Torvalds	tristate "NFTL (NAND Flash Translation Layer) support"
224ec98c681SJan Engelhardt	depends on BLOCK
225f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
2261da177e4SLinus Torvalds	---help---
2271da177e4SLinus Torvalds	  This provides support for the NAND Flash Translation Layer which is
2281da177e4SLinus Torvalds	  used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
2291da177e4SLinus Torvalds	  file system on a flash device to emulate a block device with
2301da177e4SLinus Torvalds	  512-byte sectors, on top of which you put a 'normal' file system.
2311da177e4SLinus Torvalds
2321da177e4SLinus Torvalds	  You may find that the algorithms used in this code are patented
2331da177e4SLinus Torvalds	  unless you live in the Free World where software patents aren't
2341da177e4SLinus Torvalds	  legal - in the USA you are only permitted to use this on DiskOnChip
2351da177e4SLinus Torvalds	  hardware, although under the terms of the GPL you're obviously
2361da177e4SLinus Torvalds	  permitted to copy, modify and distribute the code as you wish. Just
2371da177e4SLinus Torvalds	  not use it.
2381da177e4SLinus Torvalds
2391da177e4SLinus Torvaldsconfig NFTL_RW
2401da177e4SLinus Torvalds	bool "Write support for NFTL"
2411da177e4SLinus Torvalds	depends on NFTL
2421da177e4SLinus Torvalds	help
2431da177e4SLinus Torvalds	  Support for writing to the NAND Flash Translation Layer, as used
2441da177e4SLinus Torvalds	  on the DiskOnChip.
2451da177e4SLinus Torvalds
2461da177e4SLinus Torvaldsconfig INFTL
2471da177e4SLinus Torvalds	tristate "INFTL (Inverse NAND Flash Translation Layer) support"
248ec98c681SJan Engelhardt	depends on BLOCK
249f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
2501da177e4SLinus Torvalds	---help---
2511da177e4SLinus Torvalds	  This provides support for the Inverse NAND Flash Translation
2521da177e4SLinus Torvalds	  Layer which is used on M-Systems' newer DiskOnChip devices. It
2531da177e4SLinus Torvalds	  uses a kind of pseudo-file system on a flash device to emulate
2541da177e4SLinus Torvalds	  a block device with 512-byte sectors, on top of which you put
2551da177e4SLinus Torvalds	  a 'normal' file system.
2561da177e4SLinus Torvalds
2571da177e4SLinus Torvalds	  You may find that the algorithms used in this code are patented
2581da177e4SLinus Torvalds	  unless you live in the Free World where software patents aren't
2591da177e4SLinus Torvalds	  legal - in the USA you are only permitted to use this on DiskOnChip
2601da177e4SLinus Torvalds	  hardware, although under the terms of the GPL you're obviously
2611da177e4SLinus Torvalds	  permitted to copy, modify and distribute the code as you wish. Just
2621da177e4SLinus Torvalds	  not use it.
2631da177e4SLinus Torvalds
264e27a9960SSean Youngconfig RFD_FTL
265e27a9960SSean Young        tristate "Resident Flash Disk (Flash Translation Layer) support"
266ec98c681SJan Engelhardt	depends on BLOCK
267f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
268e27a9960SSean Young	---help---
269e27a9960SSean Young	  This provides support for the flash translation layer known
270e27a9960SSean Young	  as the Resident Flash Disk (RFD), as used by the Embedded BIOS
271cd5f6346SKyungmin Park	  of General Software. There is a blurb at:
272cd5f6346SKyungmin Park
273cd5f6346SKyungmin Park		http://www.gensw.com/pages/prod/bios/rfd.htm
274e27a9960SSean Young
27551197abfSClaudio Lanconelliconfig SSFDC
276892e4fbaSDavid Woodhouse	tristate "NAND SSFDC (SmartMedia) read only translation layer"
277ec98c681SJan Engelhardt	depends on BLOCK
278f6a7ecb1SJosh Boyer	select MTD_BLKDEVS
27951197abfSClaudio Lanconelli	help
28051197abfSClaudio Lanconelli	  This enables read only access to SmartMedia formatted NAND
28151197abfSClaudio Lanconelli	  flash. You can mount it with FAT file system.
28251197abfSClaudio Lanconelli
2837d17c02aSMaxim Levitsky
2847d17c02aSMaxim Levitskyconfig SM_FTL
2857d17c02aSMaxim Levitsky	tristate "SmartMedia/xD new translation layer"
2866372680cSKees Cook	depends on BLOCK
2877d17c02aSMaxim Levitsky	select MTD_BLKDEVS
288e5f710cfSMaxim Levitsky	select MTD_NAND_ECC
2897d17c02aSMaxim Levitsky	help
2906f92355cSMaxim Levitsky	  This enables EXPERIMENTAL R/W support for SmartMedia/xD
2917de6f798SDavid Woodhouse	  FTL (Flash translation layer).
2926f92355cSMaxim Levitsky	  Write support is only lightly tested, therefore this driver
2936f92355cSMaxim Levitsky	  isn't recommended to use with valuable data (anyway if you have
2946f92355cSMaxim Levitsky	  valuable data, do backups regardless of software/hardware you
2956f92355cSMaxim Levitsky	  use, because you never know what will eat your data...)
2966f92355cSMaxim Levitsky	  If you only need R/O access, you can use older R/O driver
2976f92355cSMaxim Levitsky	  (CONFIG_SSFDC)
2987d17c02aSMaxim Levitsky
2994b23aff0SRichard Purdieconfig MTD_OOPS
3004b23aff0SRichard Purdie	tristate "Log panic/oops to an MTD buffer"
3014b23aff0SRichard Purdie	help
3024b23aff0SRichard Purdie	  This enables panic and oops messages to be logged to a circular
3034b23aff0SRichard Purdie	  buffer in a flash partition where it can be read back at some
3044b23aff0SRichard Purdie	  later point.
3054b23aff0SRichard Purdie
306a3215902SJarkko Lavinenconfig MTD_SWAP
307a3215902SJarkko Lavinen	tristate "Swap on MTD device support"
308a3215902SJarkko Lavinen	depends on MTD && SWAP
309a3215902SJarkko Lavinen	select MTD_BLKDEVS
310a3215902SJarkko Lavinen	help
311a3215902SJarkko Lavinen	  Provides volatile block device driver on top of mtd partition
312a3215902SJarkko Lavinen          suitable for swapping.  The mapping of written blocks is not saved.
313a3215902SJarkko Lavinen	  The driver provides wear leveling by storing erase counter into the
314a3215902SJarkko Lavinen	  OOB.
315a3215902SJarkko Lavinen
316727dc612SDan Ehrenbergconfig MTD_PARTITIONED_MASTER
317727dc612SDan Ehrenberg	bool "Retain master device when partitioned"
318727dc612SDan Ehrenberg	default n
319727dc612SDan Ehrenberg	depends on MTD
320727dc612SDan Ehrenberg	help
321727dc612SDan Ehrenberg	  For historical reasons, by default, either a master is present or
322727dc612SDan Ehrenberg	  several partitions are present, but not both. The concern was that
323727dc612SDan Ehrenberg	  data listed in multiple partitions was dangerous; however, SCSI does
324727dc612SDan Ehrenberg	  this and it is frequently useful for applications. This config option
325727dc612SDan Ehrenberg	  leaves the master in even if the device is partitioned. It also makes
326727dc612SDan Ehrenberg	  the parent of the partition device be the master device, rather than
327727dc612SDan Ehrenberg	  what lies behind the master.
328727dc612SDan Ehrenberg
3291da177e4SLinus Torvaldssource "drivers/mtd/chips/Kconfig"
3301da177e4SLinus Torvalds
3311da177e4SLinus Torvaldssource "drivers/mtd/maps/Kconfig"
3321da177e4SLinus Torvalds
3331da177e4SLinus Torvaldssource "drivers/mtd/devices/Kconfig"
3341da177e4SLinus Torvalds
3351da177e4SLinus Torvaldssource "drivers/mtd/nand/Kconfig"
3361da177e4SLinus Torvalds
337cd5f6346SKyungmin Parksource "drivers/mtd/onenand/Kconfig"
338cd5f6346SKyungmin Park
33960f26520SAlexey Korolevsource "drivers/mtd/lpddr/Kconfig"
34060f26520SAlexey Korolev
341b199489dSHuang Shijiesource "drivers/mtd/spi-nor/Kconfig"
342b199489dSHuang Shijie
343801c135cSArtem B. Bityutskiysource "drivers/mtd/ubi/Kconfig"
344801c135cSArtem B. Bityutskiy
345ec98c681SJan Engelhardtendif # MTD
346