1ec98c681SJan Engelhardtmenuconfig MTD 21da177e4SLinus Torvalds tristate "Memory Technology Device (MTD) support" 3e25df120SMartin Schwidefsky depends on HAS_IOMEM 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 151da177e4SLinus Torvaldsconfig MTD_DEBUG 161da177e4SLinus Torvalds bool "Debugging" 171da177e4SLinus Torvalds help 181da177e4SLinus Torvalds This turns on low-level debugging for the entire MTD sub-system. 191da177e4SLinus Torvalds Normally, you should say 'N'. 201da177e4SLinus Torvalds 211da177e4SLinus Torvaldsconfig MTD_DEBUG_VERBOSE 221da177e4SLinus Torvalds int "Debugging verbosity (0 = quiet, 3 = noisy)" 231da177e4SLinus Torvalds depends on MTD_DEBUG 241da177e4SLinus Torvalds default "0" 251da177e4SLinus Torvalds help 261da177e4SLinus Torvalds Determines the verbosity level of the MTD debugging messages. 271da177e4SLinus Torvalds 2880f53da0SMike Frysingerconfig MTD_TESTS 2980f53da0SMike Frysinger tristate "MTD tests support" 3080f53da0SMike Frysinger depends on m 3180f53da0SMike Frysinger help 3280f53da0SMike Frysinger This option includes various MTD tests into compilation. The tests 3380f53da0SMike Frysinger should normally be compiled as kernel modules. The modules perform 3480f53da0SMike Frysinger various checks and verifications when loaded. 3580f53da0SMike Frysinger 361da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS 371da177e4SLinus Torvalds tristate "RedBoot partition table parsing" 381da177e4SLinus Torvalds ---help--- 391da177e4SLinus Torvalds RedBoot is a ROM monitor and bootloader which deals with multiple 401da177e4SLinus Torvalds 'images' in flash devices by putting a table one of the erase 411da177e4SLinus Torvalds blocks on the device, similar to a partition table, which gives 421da177e4SLinus Torvalds the offsets, lengths and names of all the images stored in the 431da177e4SLinus Torvalds flash. 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds If you need code which can detect and parse this table, and register 461da177e4SLinus Torvalds MTD 'partitions' corresponding to each image in the table, enable 471da177e4SLinus Torvalds this option. 481da177e4SLinus Torvalds 491da177e4SLinus Torvalds You will still need the parsing functions to be called by the driver 501da177e4SLinus Torvalds for your particular device. It won't happen automatically. The 511da177e4SLinus Torvalds SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 521da177e4SLinus Torvalds example. 531da177e4SLinus Torvalds 54b7b6e08fSGrant Likelyif MTD_REDBOOT_PARTS 55b7b6e08fSGrant Likely 561da177e4SLinus Torvaldsconfig MTD_REDBOOT_DIRECTORY_BLOCK 571da177e4SLinus Torvalds int "Location of RedBoot partition table" 581da177e4SLinus Torvalds default "-1" 591da177e4SLinus Torvalds ---help--- 601da177e4SLinus Torvalds This option is the Linux counterpart to the 611da177e4SLinus Torvalds CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time 621da177e4SLinus Torvalds option. 631da177e4SLinus Torvalds 641da177e4SLinus Torvalds The option specifies which Flash sectors holds the RedBoot 654992a9e8SEgry Gábor partition table. A zero or positive value gives an absolute 661da177e4SLinus Torvalds erase block number. A negative value specifies a number of 671da177e4SLinus Torvalds sectors before the end of the device. 681da177e4SLinus Torvalds 691da177e4SLinus Torvalds For example "2" means block number 2, "-1" means the last 701da177e4SLinus Torvalds block and "-2" means the penultimate block. 711da177e4SLinus Torvalds 721da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS_UNALLOCATED 731da177e4SLinus Torvalds bool "Include unallocated flash regions" 741da177e4SLinus Torvalds help 751da177e4SLinus Torvalds If you need to register each unallocated flash region as a MTD 761da177e4SLinus Torvalds 'partition', enable this option. 771da177e4SLinus Torvalds 781da177e4SLinus Torvaldsconfig MTD_REDBOOT_PARTS_READONLY 791da177e4SLinus Torvalds bool "Force read-only for RedBoot system images" 801da177e4SLinus Torvalds help 811da177e4SLinus Torvalds If you need to force read-only for 'RedBoot', 'RedBoot Config' and 821da177e4SLinus Torvalds 'FIS directory' images, enable this option. 831da177e4SLinus Torvalds 84b7b6e08fSGrant Likelyendif # MTD_REDBOOT_PARTS 85b7b6e08fSGrant Likely 861da177e4SLinus Torvaldsconfig MTD_CMDLINE_PARTS 871da177e4SLinus Torvalds bool "Command line partition table parsing" 886a8a98b2SJamie Iles depends on MTD = "y" 891da177e4SLinus Torvalds ---help--- 904992a9e8SEgry Gábor Allow generic configuration of the MTD partition tables via the kernel 911da177e4SLinus Torvalds command line. Multiple flash resources are supported for hardware where 921da177e4SLinus Torvalds different kinds of flash memory are available. 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds You will still need the parsing functions to be called by the driver 951da177e4SLinus Torvalds for your particular device. It won't happen automatically. The 961da177e4SLinus Torvalds SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 971da177e4SLinus Torvalds example. 981da177e4SLinus Torvalds 991da177e4SLinus Torvalds The format for the command line is as follows: 1001da177e4SLinus Torvalds 1011da177e4SLinus Torvalds mtdparts=<mtddef>[;<mtddef] 1021da177e4SLinus Torvalds <mtddef> := <mtd-id>:<partdef>[,<partdef>] 1031da177e4SLinus Torvalds <partdef> := <size>[@offset][<name>][ro] 1041da177e4SLinus Torvalds <mtd-id> := unique id used in mapping driver/device 1051da177e4SLinus Torvalds <size> := standard linux memsize OR "-" to denote all 1061da177e4SLinus Torvalds remaining space 1071da177e4SLinus Torvalds <name> := (NAME) 1081da177e4SLinus Torvalds 1091da177e4SLinus Torvalds Due to the way Linux handles the command line, no spaces are 1101da177e4SLinus Torvalds allowed in the partition definition, including mtd id's and partition 1111da177e4SLinus Torvalds names. 1121da177e4SLinus Torvalds 1131da177e4SLinus Torvalds Examples: 1141da177e4SLinus Torvalds 1151da177e4SLinus Torvalds 1 flash resource (mtd-id "sa1100"), with 1 single writable partition: 1161da177e4SLinus Torvalds mtdparts=sa1100:- 1171da177e4SLinus Torvalds 1181da177e4SLinus Torvalds Same flash, but 2 named partitions, the first one being read-only: 1191da177e4SLinus Torvalds mtdparts=sa1100:256k(ARMboot)ro,-(root) 1201da177e4SLinus Torvalds 1211da177e4SLinus Torvalds If unsure, say 'N'. 1221da177e4SLinus Torvalds 1231da177e4SLinus Torvaldsconfig MTD_AFS_PARTS 1241da177e4SLinus Torvalds tristate "ARM Firmware Suite partition parsing" 125b7b6e08fSGrant Likely depends on ARM 1261da177e4SLinus Torvalds ---help--- 1271da177e4SLinus Torvalds The ARM Firmware Suite allows the user to divide flash devices into 1281da177e4SLinus Torvalds multiple 'images'. Each such image has a header containing its name 1291da177e4SLinus Torvalds and offset/size etc. 1301da177e4SLinus Torvalds 1311da177e4SLinus Torvalds If you need code which can detect and parse these tables, and 1321da177e4SLinus Torvalds register MTD 'partitions' corresponding to each image detected, 1331da177e4SLinus Torvalds enable this option. 1341da177e4SLinus Torvalds 1351da177e4SLinus Torvalds You will still need the parsing functions to be called by the driver 1361da177e4SLinus Torvalds for your particular device. It won't happen automatically. The 137adf00400SMarc Zyngier 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example. 1381da177e4SLinus Torvalds 1399a310d21SScott Woodconfig MTD_OF_PARTS 140*d6137badSDmitry Eremin-Solenikov tristate "OpenFirmware partitioning information support" 141*d6137badSDmitry Eremin-Solenikov default Y 142b7b6e08fSGrant Likely depends on OF 1439a310d21SScott Wood help 1449a310d21SScott Wood This provides a partition parsing function which derives 1459a310d21SScott Wood the partition map from the children of the flash node, 1469a310d21SScott Wood as described in Documentation/powerpc/booting-without-of.txt. 1479a310d21SScott Wood 148f0797881SMatteo Croceconfig MTD_AR7_PARTS 149f0797881SMatteo Croce tristate "TI AR7 partitioning support" 150f0797881SMatteo Croce ---help--- 151f0797881SMatteo Croce TI AR7 partitioning support 152f0797881SMatteo Croce 1531da177e4SLinus Torvaldscomment "User Modules And Translation Layers" 1541da177e4SLinus Torvalds 1551da177e4SLinus Torvaldsconfig MTD_CHAR 1561da177e4SLinus Torvalds tristate "Direct char device access to MTD devices" 1571da177e4SLinus Torvalds help 1581da177e4SLinus Torvalds This provides a character device for each MTD device present in 1591da177e4SLinus Torvalds the system, allowing the user to read and write directly to the 1601da177e4SLinus Torvalds memory chips, and also use ioctl() to obtain information about 1611da177e4SLinus Torvalds the device, or to erase parts of it. 1621da177e4SLinus Torvalds 16334a82443SDavid Brownellconfig HAVE_MTD_OTP 16434a82443SDavid Brownell bool 16534a82443SDavid Brownell help 16634a82443SDavid Brownell Enable access to OTP regions using MTD_CHAR. 16734a82443SDavid Brownell 168f6a7ecb1SJosh Boyerconfig MTD_BLKDEVS 169f6a7ecb1SJosh Boyer tristate "Common interface to block layer for MTD 'translation layers'" 170ec98c681SJan Engelhardt depends on BLOCK 171f6a7ecb1SJosh Boyer default n 172f6a7ecb1SJosh Boyer 1731da177e4SLinus Torvaldsconfig MTD_BLOCK 1741da177e4SLinus Torvalds tristate "Caching block device access to MTD devices" 175ec98c681SJan Engelhardt depends on BLOCK 176f6a7ecb1SJosh Boyer select MTD_BLKDEVS 1771da177e4SLinus Torvalds ---help--- 1781da177e4SLinus Torvalds Although most flash chips have an erase size too large to be useful 1791da177e4SLinus Torvalds as block devices, it is possible to use MTD devices which are based 1801da177e4SLinus Torvalds on RAM chips in this manner. This block device is a user of MTD 1811da177e4SLinus Torvalds devices performing that function. 1821da177e4SLinus Torvalds 1831da177e4SLinus Torvalds At the moment, it is also required for the Journalling Flash File 1841da177e4SLinus Torvalds System(s) to obtain a handle on the MTD device when it's mounted 1851da177e4SLinus Torvalds (although JFFS and JFFS2 don't actually use any of the functionality 1861da177e4SLinus Torvalds of the mtdblock device). 1871da177e4SLinus Torvalds 1881da177e4SLinus Torvalds Later, it may be extended to perform read/erase/modify/write cycles 1891da177e4SLinus Torvalds on flash chips to emulate a smaller block size. Needless to say, 1901da177e4SLinus Torvalds this is very unsafe, but could be useful for file systems which are 1911da177e4SLinus Torvalds almost never written to. 1921da177e4SLinus Torvalds 1931da177e4SLinus Torvalds You do not need this option for use with the DiskOnChip devices. For 1941da177e4SLinus Torvalds those, enable NFTL support (CONFIG_NFTL) instead. 1951da177e4SLinus Torvalds 1961da177e4SLinus Torvaldsconfig MTD_BLOCK_RO 1971da177e4SLinus Torvalds tristate "Readonly block device access to MTD devices" 198ec98c681SJan Engelhardt depends on MTD_BLOCK!=y && BLOCK 199f6a7ecb1SJosh Boyer select MTD_BLKDEVS 2001da177e4SLinus Torvalds help 2011da177e4SLinus Torvalds This allows you to mount read-only file systems (such as cramfs) 2021da177e4SLinus Torvalds from an MTD device, without the overhead (and danger) of the caching 2031da177e4SLinus Torvalds driver. 2041da177e4SLinus Torvalds 2051da177e4SLinus Torvalds You do not need this option for use with the DiskOnChip devices. For 2061da177e4SLinus Torvalds those, enable NFTL support (CONFIG_NFTL) instead. 2071da177e4SLinus Torvalds 2081da177e4SLinus Torvaldsconfig FTL 2091da177e4SLinus Torvalds tristate "FTL (Flash Translation Layer) support" 210ec98c681SJan Engelhardt depends on BLOCK 211f6a7ecb1SJosh Boyer select MTD_BLKDEVS 2121da177e4SLinus Torvalds ---help--- 2131da177e4SLinus Torvalds This provides support for the original Flash Translation Layer which 2141da177e4SLinus Torvalds is part of the PCMCIA specification. It uses a kind of pseudo- 2151da177e4SLinus Torvalds file system on a flash device to emulate a block device with 2161da177e4SLinus Torvalds 512-byte sectors, on top of which you put a 'normal' file system. 2171da177e4SLinus Torvalds 2181da177e4SLinus Torvalds You may find that the algorithms used in this code are patented 2191da177e4SLinus Torvalds unless you live in the Free World where software patents aren't 2201da177e4SLinus Torvalds legal - in the USA you are only permitted to use this on PCMCIA 2211da177e4SLinus Torvalds hardware, although under the terms of the GPL you're obviously 2221da177e4SLinus Torvalds permitted to copy, modify and distribute the code as you wish. Just 2231da177e4SLinus Torvalds not use it. 2241da177e4SLinus Torvalds 2251da177e4SLinus Torvaldsconfig NFTL 2261da177e4SLinus Torvalds tristate "NFTL (NAND Flash Translation Layer) support" 227ec98c681SJan Engelhardt depends on BLOCK 228f6a7ecb1SJosh Boyer select MTD_BLKDEVS 2291da177e4SLinus Torvalds ---help--- 2301da177e4SLinus Torvalds This provides support for the NAND Flash Translation Layer which is 2311da177e4SLinus Torvalds used on M-Systems' DiskOnChip devices. It uses a kind of pseudo- 2321da177e4SLinus Torvalds file system on a flash device to emulate a block device with 2331da177e4SLinus Torvalds 512-byte sectors, on top of which you put a 'normal' file system. 2341da177e4SLinus Torvalds 2351da177e4SLinus Torvalds You may find that the algorithms used in this code are patented 2361da177e4SLinus Torvalds unless you live in the Free World where software patents aren't 2371da177e4SLinus Torvalds legal - in the USA you are only permitted to use this on DiskOnChip 2381da177e4SLinus Torvalds hardware, although under the terms of the GPL you're obviously 2391da177e4SLinus Torvalds permitted to copy, modify and distribute the code as you wish. Just 2401da177e4SLinus Torvalds not use it. 2411da177e4SLinus Torvalds 2421da177e4SLinus Torvaldsconfig NFTL_RW 2431da177e4SLinus Torvalds bool "Write support for NFTL" 2441da177e4SLinus Torvalds depends on NFTL 2451da177e4SLinus Torvalds help 2461da177e4SLinus Torvalds Support for writing to the NAND Flash Translation Layer, as used 2471da177e4SLinus Torvalds on the DiskOnChip. 2481da177e4SLinus Torvalds 2491da177e4SLinus Torvaldsconfig INFTL 2501da177e4SLinus Torvalds tristate "INFTL (Inverse NAND Flash Translation Layer) support" 251ec98c681SJan Engelhardt depends on BLOCK 252f6a7ecb1SJosh Boyer select MTD_BLKDEVS 2531da177e4SLinus Torvalds ---help--- 2541da177e4SLinus Torvalds This provides support for the Inverse NAND Flash Translation 2551da177e4SLinus Torvalds Layer which is used on M-Systems' newer DiskOnChip devices. It 2561da177e4SLinus Torvalds uses a kind of pseudo-file system on a flash device to emulate 2571da177e4SLinus Torvalds a block device with 512-byte sectors, on top of which you put 2581da177e4SLinus Torvalds a 'normal' file system. 2591da177e4SLinus Torvalds 2601da177e4SLinus Torvalds You may find that the algorithms used in this code are patented 2611da177e4SLinus Torvalds unless you live in the Free World where software patents aren't 2621da177e4SLinus Torvalds legal - in the USA you are only permitted to use this on DiskOnChip 2631da177e4SLinus Torvalds hardware, although under the terms of the GPL you're obviously 2641da177e4SLinus Torvalds permitted to copy, modify and distribute the code as you wish. Just 2651da177e4SLinus Torvalds not use it. 2661da177e4SLinus Torvalds 267e27a9960SSean Youngconfig RFD_FTL 268e27a9960SSean Young tristate "Resident Flash Disk (Flash Translation Layer) support" 269ec98c681SJan Engelhardt depends on BLOCK 270f6a7ecb1SJosh Boyer select MTD_BLKDEVS 271e27a9960SSean Young ---help--- 272e27a9960SSean Young This provides support for the flash translation layer known 273e27a9960SSean Young as the Resident Flash Disk (RFD), as used by the Embedded BIOS 274cd5f6346SKyungmin Park of General Software. There is a blurb at: 275cd5f6346SKyungmin Park 276cd5f6346SKyungmin Park http://www.gensw.com/pages/prod/bios/rfd.htm 277e27a9960SSean Young 27851197abfSClaudio Lanconelliconfig SSFDC 279892e4fbaSDavid Woodhouse tristate "NAND SSFDC (SmartMedia) read only translation layer" 280ec98c681SJan Engelhardt depends on BLOCK 281f6a7ecb1SJosh Boyer select MTD_BLKDEVS 28251197abfSClaudio Lanconelli help 28351197abfSClaudio Lanconelli This enables read only access to SmartMedia formatted NAND 28451197abfSClaudio Lanconelli flash. You can mount it with FAT file system. 28551197abfSClaudio Lanconelli 2867d17c02aSMaxim Levitsky 2877d17c02aSMaxim Levitskyconfig SM_FTL 2887d17c02aSMaxim Levitsky tristate "SmartMedia/xD new translation layer" 289e5f710cfSMaxim Levitsky depends on EXPERIMENTAL && BLOCK 2907d17c02aSMaxim Levitsky select MTD_BLKDEVS 291e5f710cfSMaxim Levitsky select MTD_NAND_ECC 2927d17c02aSMaxim Levitsky help 2936f92355cSMaxim Levitsky This enables EXPERIMENTAL R/W support for SmartMedia/xD 2947de6f798SDavid Woodhouse FTL (Flash translation layer). 2956f92355cSMaxim Levitsky Write support is only lightly tested, therefore this driver 2966f92355cSMaxim Levitsky isn't recommended to use with valuable data (anyway if you have 2976f92355cSMaxim Levitsky valuable data, do backups regardless of software/hardware you 2986f92355cSMaxim Levitsky use, because you never know what will eat your data...) 2996f92355cSMaxim Levitsky If you only need R/O access, you can use older R/O driver 3006f92355cSMaxim Levitsky (CONFIG_SSFDC) 3017d17c02aSMaxim Levitsky 3024b23aff0SRichard Purdieconfig MTD_OOPS 3034b23aff0SRichard Purdie tristate "Log panic/oops to an MTD buffer" 3044b23aff0SRichard Purdie help 3054b23aff0SRichard Purdie This enables panic and oops messages to be logged to a circular 3064b23aff0SRichard Purdie buffer in a flash partition where it can be read back at some 3074b23aff0SRichard Purdie later point. 3084b23aff0SRichard Purdie 309256331d5SPeter Korsgaard To use, add console=ttyMTDx to the kernel command line, 310256331d5SPeter Korsgaard where x is the MTD device number to use. 311256331d5SPeter Korsgaard 312a3215902SJarkko Lavinenconfig MTD_SWAP 313a3215902SJarkko Lavinen tristate "Swap on MTD device support" 314a3215902SJarkko Lavinen depends on MTD && SWAP 315a3215902SJarkko Lavinen select MTD_BLKDEVS 316a3215902SJarkko Lavinen help 317a3215902SJarkko Lavinen Provides volatile block device driver on top of mtd partition 318a3215902SJarkko Lavinen suitable for swapping. The mapping of written blocks is not saved. 319a3215902SJarkko Lavinen The driver provides wear leveling by storing erase counter into the 320a3215902SJarkko Lavinen OOB. 321a3215902SJarkko Lavinen 3221da177e4SLinus Torvaldssource "drivers/mtd/chips/Kconfig" 3231da177e4SLinus Torvalds 3241da177e4SLinus Torvaldssource "drivers/mtd/maps/Kconfig" 3251da177e4SLinus Torvalds 3261da177e4SLinus Torvaldssource "drivers/mtd/devices/Kconfig" 3271da177e4SLinus Torvalds 3281da177e4SLinus Torvaldssource "drivers/mtd/nand/Kconfig" 3291da177e4SLinus Torvalds 330cd5f6346SKyungmin Parksource "drivers/mtd/onenand/Kconfig" 331cd5f6346SKyungmin Park 33260f26520SAlexey Korolevsource "drivers/mtd/lpddr/Kconfig" 33360f26520SAlexey Korolev 334801c135cSArtem B. Bityutskiysource "drivers/mtd/ubi/Kconfig" 335801c135cSArtem B. Bityutskiy 336ec98c681SJan Engelhardtendif # MTD 337