blob: b1a69cccf71cdfa2b6d5054d0bcbeb69eac0ba2a [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001menuconfig MTD
2 tristate "Memory Technology Device (MTD) support"
3 help
4 Memory Technology Devices are flash, RAM and similar chips, often
5 used for solid state file systems on embedded devices. This option
6 will provide the generic support for MTD drivers to register
7 themselves with the kernel and for potential users of MTD devices
8 to enumerate the devices which are present and obtain a handle on
9 them. It will also allow you to select individual drivers for
10 particular hardware and users of MTD devices. If unsure, say N.
11
12if MTD
13
14menu "OpenWrt specific MTD options"
15
16config MTD_ROOTFS_ROOT_DEV
17 bool "Automatically set 'rootfs' partition to be root filesystem"
18 default y
19
20config MTD_SPLIT_FIRMWARE
21 bool "Automatically split firmware partition for kernel+rootfs"
22 default y
23
24config MTD_SPLIT_FIRMWARE_NAME
25 string "Firmware partition name"
26 depends on MTD_SPLIT_FIRMWARE
27 default "firmware"
28
29source "drivers/mtd/mtdsplit/Kconfig"
30
31endmenu
32
33config MTD_TESTS
34 tristate "MTD tests support (DANGEROUS)"
35 depends on m
36 help
37 This option includes various MTD tests into compilation. The tests
38 should normally be compiled as kernel modules. The modules perform
39 various checks and verifications when loaded.
40
41 WARNING: some of the tests will ERASE entire MTD device which they
42 test. Do not use these tests unless you really know what you do.
43
44config MTD_REDBOOT_PARTS
45 tristate "RedBoot partition table parsing"
46 help
47 RedBoot is a ROM monitor and bootloader which deals with multiple
48 'images' in flash devices by putting a table one of the erase
49 blocks on the device, similar to a partition table, which gives
50 the offsets, lengths and names of all the images stored in the
51 flash.
52
53 If you need code which can detect and parse this table, and register
54 MTD 'partitions' corresponding to each image in the table, enable
55 this option.
56
57 You will still need the parsing functions to be called by the driver
58 for your particular device. It won't happen automatically. The
59 SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
60 example.
61
62if MTD_REDBOOT_PARTS
63
64config MTD_REDBOOT_DIRECTORY_BLOCK
65 int "Location of RedBoot partition table"
66 default "-1"
67 help
68 This option is the Linux counterpart to the
69 CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
70 option.
71
72 The option specifies which Flash sectors holds the RedBoot
73 partition table. A zero or positive value gives an absolute
74 erase block number. A negative value specifies a number of
75 sectors before the end of the device.
76
77 For example "2" means block number 2, "-1" means the last
78 block and "-2" means the penultimate block.
79
80config MTD_REDBOOT_PARTS_UNALLOCATED
81 bool "Include unallocated flash regions"
82 help
83 If you need to register each unallocated flash region as a MTD
84 'partition', enable this option.
85
86config MTD_REDBOOT_PARTS_READONLY
87 bool "Force read-only for RedBoot system images"
88 help
89 If you need to force read-only for 'RedBoot', 'RedBoot Config' and
90 'FIS directory' images, enable this option.
91
92endif # MTD_REDBOOT_PARTS
93
94config MTD_CMDLINE_PARTS
95 tristate "Command line partition table parsing"
96 depends on MTD
97 help
98 Allow generic configuration of the MTD partition tables via the kernel
99 command line. Multiple flash resources are supported for hardware where
100 different kinds of flash memory are available.
101
102 You will still need the parsing functions to be called by the driver
103 for your particular device. It won't happen automatically. The
104 SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
105 example.
106
107 The format for the command line is as follows:
108
109 mtdparts=<mtddef>[;<mtddef]
110 <mtddef> := <mtd-id>:<partdef>[,<partdef>]
111 <partdef> := <size>[@offset][<name>][ro]
112 <mtd-id> := unique id used in mapping driver/device
113 <size> := standard linux memsize OR "-" to denote all
114 remaining space
115 <name> := (NAME)
116
117 Due to the way Linux handles the command line, no spaces are
118 allowed in the partition definition, including mtd id's and partition
119 names.
120
121 Examples:
122
123 1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
124 mtdparts=sa1100:-
125
126 Same flash, but 2 named partitions, the first one being read-only:
127 mtdparts=sa1100:256k(ARMboot)ro,-(root)
128
129 If unsure, say 'N'.
130
131config MTD_AFS_PARTS
132 tristate "ARM Firmware Suite partition parsing"
133 depends on (ARM || ARM64)
134 help
135 The ARM Firmware Suite allows the user to divide flash devices into
136 multiple 'images'. Each such image has a header containing its name
137 and offset/size etc.
138
139 If you need code which can detect and parse these tables, and
140 register MTD 'partitions' corresponding to each image detected,
141 enable this option.
142
143 You will still need the parsing functions to be called by the driver
144 for your particular device. It won't happen automatically. The
145 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
146
147config MTD_OF_PARTS
148 tristate "OpenFirmware partitioning information support"
149 default y
150 depends on OF
151 help
152 This provides a partition parsing function which derives
153 the partition map from the children of the flash node,
154 as described in Documentation/devicetree/bindings/mtd/partition.txt.
155
156config MTD_AR7_PARTS
157 tristate "TI AR7 partitioning support"
158 help
159 TI AR7 partitioning support
160
161config MTD_BCM63XX_PARTS
162 tristate "BCM63XX CFE partitioning support"
163 depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
164 select CRC32
165 help
166 This provides partions parsing for BCM63xx devices with CFE
167 bootloaders.
168
169config MTD_BCM47XX_PARTS
170 tristate "BCM47XX partitioning support"
171 depends on BCM47XX || ARCH_BCM_5301X
172 help
173 This provides partitions parser for devices based on BCM47xx
174 boards.
175
176config MTD_GPT_PARTS
177 tristate "GPT partitioning support"
178 help
179 GPT, abbreviation of GUID Partition Table, is a standard for the
180 layout of partition tables using globally unique identifiers (GUIDs).
181 This provides a partition parsing function to parse those devices
182 have GUID Partition Table.
183
184config MTD_PMT_PARTS
185 tristate "PMT partitioning support"
186 help
187 This provides partions parsing PMT format.
188
189menu "Partition parsers"
190source "drivers/mtd/parsers/Kconfig"
191endmenu
192
193config MTD_MYLOADER_PARTS
194 tristate "MyLoader partition parsing"
195 depends on ADM5120 || ATH25 || ATH79
196 ---help---
197 MyLoader is a bootloader which allows the user to define partitions
198 in flash devices, by putting a table in the second erase block
199 on the device, similar to a partition table. This table gives the
200 offsets and lengths of the user defined partitions.
201
202 If you need code which can detect and parse these tables, and
203 register MTD 'partitions' corresponding to each image detected,
204 enable this option.
205
206 You will still need the parsing functions to be called by the driver
207 for your particular device. It won't happen automatically.
208
209comment "User Modules And Translation Layers"
210
211#
212# MTD block device support is select'ed if needed
213#
214config MTD_BLKDEVS
215 tristate
216
217config MTD_BLOCK
218 tristate "Caching block device access to MTD devices"
219 depends on BLOCK
220 select MTD_BLKDEVS
221 help
222 Although most flash chips have an erase size too large to be useful
223 as block devices, it is possible to use MTD devices which are based
224 on RAM chips in this manner. This block device is a user of MTD
225 devices performing that function.
226
227 At the moment, it is also required for the Journalling Flash File
228 System(s) to obtain a handle on the MTD device when it's mounted
229 (although JFFS and JFFS2 don't actually use any of the functionality
230 of the mtdblock device).
231
232 Later, it may be extended to perform read/erase/modify/write cycles
233 on flash chips to emulate a smaller block size. Needless to say,
234 this is very unsafe, but could be useful for file systems which are
235 almost never written to.
236
237 You do not need this option for use with the DiskOnChip devices. For
238 those, enable NFTL support (CONFIG_NFTL) instead.
239
240config MTD_BLOCK_RO
241 tristate "Readonly block device access to MTD devices"
242 depends on MTD_BLOCK!=y && BLOCK
243 select MTD_BLKDEVS
244 help
245 This allows you to mount read-only file systems (such as cramfs)
246 from an MTD device, without the overhead (and danger) of the caching
247 driver.
248
249 You do not need this option for use with the DiskOnChip devices. For
250 those, enable NFTL support (CONFIG_NFTL) instead.
251
252config FTL
253 tristate "FTL (Flash Translation Layer) support"
254 depends on BLOCK
255 select MTD_BLKDEVS
256 help
257 This provides support for the original Flash Translation Layer which
258 is part of the PCMCIA specification. It uses a kind of pseudo-
259 file system on a flash device to emulate a block device with
260 512-byte sectors, on top of which you put a 'normal' file system.
261
262 You may find that the algorithms used in this code are patented
263 unless you live in the Free World where software patents aren't
264 legal - in the USA you are only permitted to use this on PCMCIA
265 hardware, although under the terms of the GPL you're obviously
266 permitted to copy, modify and distribute the code as you wish. Just
267 not use it.
268
269config NFTL
270 tristate "NFTL (NAND Flash Translation Layer) support"
271 depends on BLOCK
272 select MTD_BLKDEVS
273 help
274 This provides support for the NAND Flash Translation Layer which is
275 used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
276 file system on a flash device to emulate a block device with
277 512-byte sectors, on top of which you put a 'normal' file system.
278
279 You may find that the algorithms used in this code are patented
280 unless you live in the Free World where software patents aren't
281 legal - in the USA you are only permitted to use this on DiskOnChip
282 hardware, although under the terms of the GPL you're obviously
283 permitted to copy, modify and distribute the code as you wish. Just
284 not use it.
285
286config NFTL_RW
287 bool "Write support for NFTL"
288 depends on NFTL
289 help
290 Support for writing to the NAND Flash Translation Layer, as used
291 on the DiskOnChip.
292
293config INFTL
294 tristate "INFTL (Inverse NAND Flash Translation Layer) support"
295 depends on BLOCK
296 select MTD_BLKDEVS
297 help
298 This provides support for the Inverse NAND Flash Translation
299 Layer which is used on M-Systems' newer DiskOnChip devices. It
300 uses a kind of pseudo-file system on a flash device to emulate
301 a block device with 512-byte sectors, on top of which you put
302 a 'normal' file system.
303
304 You may find that the algorithms used in this code are patented
305 unless you live in the Free World where software patents aren't
306 legal - in the USA you are only permitted to use this on DiskOnChip
307 hardware, although under the terms of the GPL you're obviously
308 permitted to copy, modify and distribute the code as you wish. Just
309 not use it.
310
311config RFD_FTL
312 tristate "Resident Flash Disk (Flash Translation Layer) support"
313 depends on BLOCK
314 select MTD_BLKDEVS
315 help
316 This provides support for the flash translation layer known
317 as the Resident Flash Disk (RFD), as used by the Embedded BIOS
318 of General Software. There is a blurb at:
319
320 http://www.gensw.com/pages/prod/bios/rfd.htm
321
322config SSFDC
323 tristate "NAND SSFDC (SmartMedia) read only translation layer"
324 depends on BLOCK
325 select MTD_BLKDEVS
326 help
327 This enables read only access to SmartMedia formatted NAND
328 flash. You can mount it with FAT file system.
329
330
331config SM_FTL
332 tristate "SmartMedia/xD new translation layer"
333 depends on BLOCK
334 select MTD_BLKDEVS
335 select MTD_NAND_ECC
336 help
337 This enables EXPERIMENTAL R/W support for SmartMedia/xD
338 FTL (Flash translation layer).
339 Write support is only lightly tested, therefore this driver
340 isn't recommended to use with valuable data (anyway if you have
341 valuable data, do backups regardless of software/hardware you
342 use, because you never know what will eat your data...)
343 If you only need R/O access, you can use older R/O driver
344 (CONFIG_SSFDC)
345
346config MTD_OOPS
347 tristate "Log panic/oops to an MTD buffer"
348 help
349 This enables panic and oops messages to be logged to a circular
350 buffer in a flash partition where it can be read back at some
351 later point.
352
353config MTD_SWAP
354 tristate "Swap on MTD device support"
355 depends on MTD && SWAP
356 select MTD_BLKDEVS
357 help
358 Provides volatile block device driver on top of mtd partition
359 suitable for swapping. The mapping of written blocks is not saved.
360 The driver provides wear leveling by storing erase counter into the
361 OOB.
362
363config MTD_PARTITIONED_MASTER
364 bool "Retain master device when partitioned"
365 default n
366 depends on MTD
367 help
368 For historical reasons, by default, either a master is present or
369 several partitions are present, but not both. The concern was that
370 data listed in multiple partitions was dangerous; however, SCSI does
371 this and it is frequently useful for applications. This config option
372 leaves the master in even if the device is partitioned. It also makes
373 the parent of the partition device be the master device, rather than
374 what lies behind the master.
375
376config MTD_NANDX_V2
377 tristate "Enable or disable Mediatek NAND-2.0 Feature"
378 depends on MTD
379 help
380 This option will support parallel SLC & SPI NAND device via Mediatek
381 NFI controller. If the option is enabled, the NAND-2.0 specific files
382 will be compiled in nandx.
383
384source "drivers/mtd/chips/Kconfig"
385
386source "drivers/mtd/maps/Kconfig"
387
388source "drivers/mtd/devices/Kconfig"
389
390source "drivers/mtd/nand/Kconfig"
391
392source "drivers/mtd/nandx/Kconfig"
393
394source "drivers/mtd/lpddr/Kconfig"
395
396source "drivers/mtd/spi-nor/Kconfig"
397
398source "drivers/mtd/ubi/Kconfig"
399
400source "drivers/mtd/composite/Kconfig"
401
402endif # MTD