drivers/mtd/Kconfig

Source file repositories/reference/linux-study-clean/drivers/mtd/Kconfig

File Facts

System
Linux kernel
Corpus path
drivers/mtd/Kconfig
Extension
[no extension]
Size
8279 bytes
Lines
235
Domain
Driver Families
Bucket
drivers/mtd
Inferred role
Driver Families: build/configuration rule
Status
atlas-only

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

menuconfig MTD
	tristate "Memory Technology Device (MTD) support"
	imply NVMEM
	help
	  Memory Technology Devices are flash, RAM and similar chips, often
	  used for solid state file systems on embedded devices. This option
	  will provide the generic support for MTD drivers to register
	  themselves with the kernel and for potential users of MTD devices
	  to enumerate the devices which are present and obtain a handle on
	  them. It will also allow you to select individual drivers for
	  particular hardware and users of MTD devices. If unsure, say N.

if MTD

config MTD_TESTS
	tristate "MTD tests support (DANGEROUS)"
	depends on m
	help
	  This option includes various MTD tests into compilation. The tests
	  should normally be compiled as kernel modules. The modules perform
	  various checks and verifications when loaded.

	  WARNING: some of the tests will ERASE entire MTD device which they
	  test. Do not use these tests unless you really know what you do.

menu "Partition parsers"
source "drivers/mtd/parsers/Kconfig"
endmenu

comment "User Modules And Translation Layers"

#
# MTD block device support is select'ed if needed
#
config MTD_BLKDEVS
	tristate

config MTD_BLOCK
	tristate "Caching block device access to MTD devices"
	depends on BLOCK
	select MTD_BLKDEVS
	help
	  Although most flash chips have an erase size too large to be useful
	  as block devices, it is possible to use MTD devices which are based
	  on RAM chips in this manner. This block device is a user of MTD
	  devices performing that function.

	  Note that mounting a JFFS2 filesystem doesn't require using mtdblock.
	  It's possible to mount a rootfs using the MTD device on the "root="
	  bootargs as "root=mtd2" or "root=mtd:name_of_device".

	  Later, it may be extended to perform read/erase/modify/write cycles
	  on flash chips to emulate a smaller block size. Needless to say,
	  this is very unsafe, but could be useful for file systems which are
	  almost never written to.

	  You do not need this option for use with the DiskOnChip devices. For
	  those, enable NFTL support (CONFIG_NFTL) instead.

config MTD_BLOCK_RO
	tristate "Readonly block device access to MTD devices"
	depends on MTD_BLOCK!=y && BLOCK
	select MTD_BLKDEVS
	help
	  This allows you to mount read-only file systems (such as cramfs)
	  from an MTD device, without the overhead (and danger) of the caching
	  driver.

	  You do not need this option for use with the DiskOnChip devices. For
	  those, enable NFTL support (CONFIG_NFTL) instead.

Annotation

Implementation Notes