Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / mtd / chips / Kconfig
index d682dbc..a7ec595 100644 (file)
@@ -1,5 +1,5 @@
 # drivers/mtd/chips/Kconfig
-# $Id: Kconfig,v 1.13 2004/12/01 15:49:10 nico Exp $
+# $Id: Kconfig,v 1.18 2005/11/07 11:14:22 gleixner Exp $
 
 menu "RAM/ROM/Flash chip drivers"
        depends on MTD!=n
@@ -25,12 +25,12 @@ config MTD_JEDECPROBE
          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 will shortly cover also
-         non-CFI Intel chips (that code is in MTD CVS and should shortly be sent
-         for inclusion in Linus' tree)
+         covers most AMD/Fujitsu-compatible chips and also non-CFI
+         Intel chips.
 
 config MTD_GEN_PROBE
        tristate
+       select OBSOLETE_INTERMODULE
 
 config MTD_CFI_ADV_OPTIONS
        bool "Flash chip driver advanced configuration options"
@@ -39,7 +39,7 @@ config MTD_CFI_ADV_OPTIONS
          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 
+         option does not directly affect the code, but will enable other
          configuration options which allow you to do so.
 
          If unsure, say 'N'.
@@ -56,7 +56,7 @@ config MTD_CFI_NOSWAP
          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. 
+         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.
 
@@ -79,10 +79,10 @@ config MTD_CFI_GEOMETRY
        bool "Specific CFI Flash geometry selection"
        depends on MTD_CFI_ADV_OPTIONS
        help
-         This option does not affect the code directly, but will enable 
+         This option does not affect the code directly, but will enable
          some other configuration options which would allow you to reduce
-         the size of the kernel by including support for only certain 
-         arrangements of CFI chips. If unsure, say 'N' and all options 
+         the size of the kernel by including support for only certain
+         arrangements of CFI chips. If unsure, say 'N' and all options
          which are supported by the current code will be enabled.
 
 config MTD_MAP_BANK_WIDTH_1
@@ -155,6 +155,31 @@ config MTD_CFI_I8
          If your flash chips are interleaved in eights - i.e. you have eight
          flash chips addressed by each bus cycle, then say 'Y'.
 
+config MTD_OTP
+       bool "Protection Registers aka one-time programmable (OTP) bits"
+       depends on MTD_CFI_ADV_OPTIONS
+       default n
+       help
+         This enables support for reading, writing and locking so called
+         "Protection Registers" present on some flash chips.
+         A subset of them are pre-programmed at the factory with a
+         unique set of values. The rest is user-programmable.
+
+         The user-programmable Protection Registers contain one-time
+         programmable (OTP) bits; when programmed, register bits cannot be
+         erased. Each Protection Register can be accessed multiple times to
+         program individual bits, as long as the register remains unlocked.
+
+         Each Protection Register has an associated Lock Register bit. When a
+         Lock Register bit is programmed, the associated Protection Register
+         can only be read; it can no longer be programmed. Additionally,
+         because the Lock Register bits themselves are OTP, when programmed,
+         Lock Register bits cannot be erased. Therefore, when a Protection
+         Register is locked, it cannot be unlocked.
+
+         This feature should therefore be used with extreme care. Any mistake
+         in the programming of OTP bits will waste them.
+
 config MTD_CFI_INTELEXT
        tristate "Support for Intel/Sharp flash chips"
        depends on MTD_GEN_PROBE
@@ -172,30 +197,9 @@ config MTD_CFI_AMDSTD
        help
          The Common Flash Interface defines a number of different command
          sets which a CFI-compliant chip may claim to implement. This code
-         provides support for one of those command sets, used on chips 
+         provides support for one of those command sets, used on chips
          including the AMD Am29LV320.
 
-config MTD_CFI_AMDSTD_RETRY
-       int "Retry failed commands (erase/program)"
-       depends on MTD_CFI_AMDSTD
-       default "0"
-       help
-         Some chips, when attached to a shared bus, don't properly filter
-         bus traffic that is destined to other devices.  This broken
-         behavior causes erase and program sequences to be aborted when
-         the sequences are mixed with traffic for other devices.
-
-         SST49LF040 (and related) chips are know to be broken.
-
-config MTD_CFI_AMDSTD_RETRY_MAX
-       int "Max retries of failed commands (erase/program)"
-       depends on MTD_CFI_AMDSTD_RETRY
-       default "0"
-       help
-         If you have an SST49LF040 (or related chip) then this value should
-         be set to at least 1.  This can also be adjusted at driver load
-         time with the retry_cmd_max module parameter.
-
 config MTD_CFI_STAA
        tristate "Support for ST (Advanced Architecture) flash chips"
        depends on MTD_GEN_PROBE
@@ -212,14 +216,14 @@ config MTD_RAM
        tristate "Support for RAM chips in bus mapping"
        depends on MTD
        help
-         This option enables basic support for RAM chips accessed through 
+         This option enables basic support for RAM chips accessed through
          a bus mapping driver.
 
 config MTD_ROM
        tristate "Support for ROM chips in bus mapping"
        depends on MTD
        help
-         This option enables basic support for ROM chips accessed through 
+         This option enables basic support for ROM chips accessed through
          a bus mapping driver.
 
 config MTD_ABSENT
@@ -234,7 +238,7 @@ config MTD_ABSENT
          with this driver will return -ENODEV upon access.
 
 config MTD_OBSOLETE_CHIPS
-       depends on MTD && BROKEN
+       depends on MTD
        bool "Older (theoretically obsoleted now) drivers for non-CFI chips"
        help
          This option does not enable any code directly, but will allow you to
@@ -247,10 +251,10 @@ config MTD_OBSOLETE_CHIPS
 
 config MTD_AMDSTD
        tristate "AMD compatible flash chip support (non-CFI)"
-       depends on MTD && MTD_OBSOLETE_CHIPS
+       depends on MTD && MTD_OBSOLETE_CHIPS && BROKEN
        help
          This option enables support for flash chips using AMD-compatible
-         commands, including some which are not CFI-compatible and hence 
+         commands, including some which are not CFI-compatible and hence
          cannot be used with the CONFIG_MTD_CFI_AMDSTD option.
 
          It also works on AMD compatible chips that do conform to CFI.
@@ -260,12 +264,12 @@ config MTD_SHARP
        depends on MTD && MTD_OBSOLETE_CHIPS
        help
          This option enables support for flash chips using Sharp-compatible
-         commands, including some which are not CFI-compatible and hence 
+         commands, including some which are not CFI-compatible and hence
          cannot be used with the CONFIG_MTD_CFI_INTELxxx options.
 
 config MTD_JEDEC
        tristate "JEDEC device support"
-       depends on MTD && MTD_OBSOLETE_CHIPS
+       depends on MTD && MTD_OBSOLETE_CHIPS && BROKEN
        help
          Enable older older JEDEC flash interface devices for self
          programming flash.  It is commonly used in older AMD chips.  It is
@@ -275,7 +279,7 @@ config MTD_JEDEC
 
 config MTD_XIP
        bool "XIP aware MTD support"
-       depends on !SMP && MTD_CFI_INTELEXT && EXPERIMENTAL
+       depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARCH_MTD_XIP
        default y if XIP_KERNEL
        help
          This allows MTD support to work with flash memory which is also