# drivers/mtd/chips/Kconfig

menu "RAM/ROM/Flash chip drivers"
	depends on MTD!=n

config MTD_CFI
	tristate "Detect flash chips by Common Flash Interface (CFI) probe"
	select MTD_GEN_PROBE
	help
	  The Common Flash Interface specification was developed by Intel,
	  AMD and other flash manufactures that provides a universal method
	  for probing the capabilities of flash devices. If you wish to
	  support any device that is CFI-compliant, you need to enable this
	  option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
	  for more information on CFI.

config MTD_JEDECPROBE
	tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
	select MTD_GEN_PROBE
	help
	  This option enables JEDEC-style probing of flash chips which are not
	  compatible with the Common Flash Interface, but will use the common
	  CFI-targetted flash drivers for any chips which are identified which
	  are in fact compatible in all but the probe method. This actually
	  covers most AMD/Fujitsu-compatible chips and also non-CFI
	  Intel chips.

config MTD_GEN_PROBE
	tristate

config MTD_CFI_ADV_OPTIONS
	bool "Flash chip driver advanced configuration options"
	depends on MTD_GEN_PROBE
	help
	  If you need to specify a specific endianness for access to flash
	  chips, or if you wish to reduce the size of the kernel by including
	  support for only specific arrangements of flash chips, say 'Y'. This
	  option does not directly affect the code, but will enable other
	  configuration options which allow you to do so.

	  If unsure, say 'N'.

choice
	prompt "Flash cmd/query data swapping"
	depends on MTD_CFI_ADV_OPTIONS
	default MTD_CFI_NOSWAP

config MTD_CFI_NOSWAP
	bool "NO"
	---help---
	  This option defines the way in which the CPU attempts to arrange
	  data bits when writing the 'magic' commands to the chips. Saying
	  'NO', which is the default when CONFIG_MTD_CFI_ADV_OPTIONS isn't
	  enabled, means that the CPU will not do any swapping; the chips
	  are expected to be wired to the CPU in 'host-endian' form.
	  Specific arrangements are possible with the BIG_ENDIAN_BYTE and
	  LITTLE_ENDIAN_BYTE, if the bytes are reversed.

	  If you have a LART, on which the data (and address) lines were
	  connected in a fashion which ensured that the nets were as short
	  as possible, resulting in a bit-shuffling which seems uus.on
	  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_DEBUG
	bool "Debugging"
	help
	  This turns on low-level debugging for the entire MTD sub-system.
	  Normally, you should say 'N'.

config MTD_DEBUG_VERBOSE
	int "Debugging verbosity (0 = quiet, 3 = noisy)"
	depends on MTD_DEBUG
	default "0"
	help
	  Determines the verbosity level of the MTD debugging messages.

config MTD_CONCAT
	tristate "MTD concatenating support"
	help
	  Support for concatenating several MTD devices into a single
	  (virtual) one. This allows you to have -for example- a JFFS(2)
	  file system spanning multiple physical flash chips. If unsure,
	  say 'Y'.

config MTD_PARTITIONS
	bool "MTD partitioning support"
	help
	  If you have a device which needs to divide its flash chip(s) up
	  into multiple 'partitions', each of which appears to the user as
	  a separate MTD device, you require this option to be enabled. If
	  unsure, say 'Y'.

	  Note, however, that you don't need this option for the DiskOnChip
	  devices. Partitioning on NFTL 'devices' is a different - that's the
	  'normal' form of partitioning used on a block device.

config MTD_REDBOOT_PARTS
	tristate "RedBoot partition table parsing"
	depends on MTD_PARTITIONS
	---help---
	  RedBoot is a ROM monitor and bootloader which deals with multiple
	  'images' in flash devices by putting a table one of the erase
	  blocks on the device, similar to a partition table, which gives
	  the offsets, lengths and names of all the images stored in the
	  flash.

	  If you need code which can detect and parse this table, and register
	  MTD 'partitions' corresponding to each image in the table, enable
	  this option.

	  You will still need the parsing functions to be called by the driver
	  for your particular device. It won't happen automatically. The
	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
	  example.

config MTD_REDBOOT_DIRECTORY_BLOCK
	int "Location of RedBoot partition table"
	depends on MTD_REDBOOT_PARTS
	default "-1"
	---help---
	  This option is the Linux counterpart to the
	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
	  option.

	  The option specifies which Flash sectors holds the RedBoot
	  partition table.  A zero or positive value gives an absolute
	  erase block number. A negative value specifies a number of
	  sectors before the end of the device.

	  For example "2" means block number 2, "-1" means the last
	  block and "-2" means the penultimate block.

config MTD_REDBOOT_PARTS_UNALLOCATED
	bool "Include unallocated flash regions"
	depends on MTD_REDBOOT_PARTS
	help
	  If you need to register each unallocated flash region as a MTD
	  'partition', enable this option.

config MTD_REDBOOT_PARTS_READONLY
	bool "Force read-only for RedBoot system images"
	depends on MTD_REDBOOT_PARTS
	help
	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
	  'FIS directory' images, enable this option.

config MTD_CMDLINE_PARTS
	bool "Command line partition table parsing"
	depends on MTD_PARTITIONS = "y" && MTD = "y"
	---help---
	  Allow generic configuration of the MTD partition tables via the kernel
	  command line. Multiple flash resources are supported for hardware where
	  different kinds of flash memory are available.

	  You will still need the parsing functions to be called by the driver
	  for your particular device. It won't happen automatically. The
	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
	  example.

	  The format for the command line is as follows:

	  mtdparts=<mtddef>[;<mtddef]
	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
	  <partdef> := <size>[@offset][<name>][ro]
	  <mtd-id>  := unique id used in mapping driver/device
	  <size>    := standard linux memsize OR "-" to denote all
	  remaining space
	  <name>    := (NAME)

	  Due to the way Linux handles the command line, no spaces are
	  allowed in the partition definition, including mtd id's and partition
	  names.

	  Examples:

	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
	  mtdparts=sa1100:-

	  Same flash, but 2 named partitions, the first one being read-only:
	  mtdparts=sa1100:256k(ARMboot)ro,-(root)

	  If unsure, say 'N'.

config MTD_AFS_PARTS
	tristate "ARM Firmware Suite partition parsing"
	depends on ARM && MTD_PARTITIONS
	---help---
	  The ARM Firmware Suite allows the user to divide flash devices into
	  multiple 'images'. Each such image has a header containing its name
	  and offset/size etc.

	  If you need code which can detect and parse these tables, and
	  register MTD 'partitions' corresponding to each image detected,
	  enable this option.

	  You will still need the parsing functions to be called by the driver
	  for your particular device. It won't happen automatically. The
	  'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.

config MTD_OF_PARTS
	tristate "Flash partition map based on OF description"
	depends on PPC_OF && MTD_PARTITIONS
	help
	  This provides a partition parsing function which derives
	  the partition map from the children of the flash node,
	  as described in Documentation/powerpc/booting-without-of.txt.

config MTD_AR7_PARTS
	tristate "TI AR7 partitioning support"
	depends on MTD_PARTITIONS
	---help---
	  TI AR7 partitioning support

comment "User Modules And Translation Layers"

config MTD_CHAR
	tristate "Direct char device access to MTD devices"
	help
	  This provides a character device for each MTD device present in
	  the system, allowing the user to read and write directly to the
	  memory chips, and also use ioctl() to obtain information about
	  the device, or to erase parts of it.

config MTD_BLKDEVS
	tristate "Common interface to block layer for MTD 'translation layers'"
	depends on BLOCK
	default n

