aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 19:55:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 19:55:42 -0400
commitf5e7e844a571124ffc117d4696787d6afc4fc5ae (patch)
tree26bb17dc94e9536da540c187b00cedb0c1b24664 /Documentation
parent48445159e9ecb44a96a4de06c6ae7c54eb43ba5b (diff)
parent4a43faf54e9173b6acce37cf7f053fc9515a2cdf (diff)
Merge tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd
Pull mtd update from David Woodhouse: - More robust parsing especially of xattr data in JFFS2 - Updates to mxc_nand and gpmi drivers to support new boards and device tree - Improve consistency of information about ECC strength in NAND devices - Clean up partition handling of plat_nand - Support NAND drivers without dedicated access to OOB area - BCH hardware ECC support for OMAP - Other fixes and cleanups, and a few new device IDs Fixed trivial conflict in drivers/mtd/nand/gpmi-nand/gpmi-nand.c due to added include files next to each other. * tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd: (75 commits) mtd: mxc_nand: move ecc strengh setup before nand_scan_tail mtd: block2mtd: fix recursive call of mtd_writev mtd: gpmi-nand: define ecc.strength mtd: of_parts: fix breakage in Kconfig mtd: nand: fix scan_read_raw_oob mtd: docg3 fix in-middle of blocks reads mtd: cfi_cmdset_0002: Slight cleanup of fixup messages mtd: add fixup for S29NS512P NOR flash. jffs2: allow to complete xattr integrity check on first GC scan jffs2: allow to discriminate between recoverable and non-recoverable errors mtd: nand: omap: add support for hardware BCH ecc ARM: OMAP3: gpmc: add BCH ecc api and modes mtd: nand: check the return code of 'read_oob/read_oob_raw' mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw' mtd: m25p80: Add support for Winbond W25Q80BW jffs2: get rid of jffs2_sync_super jffs2: remove unnecessary GC pass on sync jffs2: remove unnecessary GC pass on umount jffs2: remove lock_super mtd: gpmi: add gpmi support for mx6q ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-class-mtd51
-rw-r--r--Documentation/DocBook/mtdnand.tmpl2
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmi-nand.txt33
-rw-r--r--Documentation/devicetree/bindings/mtd/mxc-nand.txt19
4 files changed, 103 insertions, 2 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-mtd b/Documentation/ABI/testing/sysfs-class-mtd
index 4d55a1888981..db1ad7e34fc3 100644
--- a/Documentation/ABI/testing/sysfs-class-mtd
+++ b/Documentation/ABI/testing/sysfs-class-mtd
@@ -123,3 +123,54 @@ Description:
123 half page, or a quarter page). 123 half page, or a quarter page).
124 124
125 In the case of ECC NOR, it is the ECC block size. 125 In the case of ECC NOR, it is the ECC block size.
126
127What: /sys/class/mtd/mtdX/ecc_strength
128Date: April 2012
129KernelVersion: 3.4
130Contact: linux-mtd@lists.infradead.org
131Description:
132 Maximum number of bit errors that the device is capable of
133 correcting within each region covering an ecc step. This will
134 always be a non-negative integer. Note that some devices will
135 have multiple ecc steps within each writesize region.
136
137 In the case of devices lacking any ECC capability, it is 0.
138
139What: /sys/class/mtd/mtdX/bitflip_threshold
140Date: April 2012
141KernelVersion: 3.4
142Contact: linux-mtd@lists.infradead.org
143Description:
144 This allows the user to examine and adjust the criteria by which
145 mtd returns -EUCLEAN from mtd_read(). If the maximum number of
146 bit errors that were corrected on any single region comprising
147 an ecc step (as reported by the driver) equals or exceeds this
148 value, -EUCLEAN is returned. Otherwise, absent an error, 0 is
149 returned. Higher layers (e.g., UBI) use this return code as an
150 indication that an erase block may be degrading and should be
151 scrutinized as a candidate for being marked as bad.
152
153 The initial value may be specified by the flash device driver.
154 If not, then the default value is ecc_strength.
155
156 The introduction of this feature brings a subtle change to the
157 meaning of the -EUCLEAN return code. Previously, it was
158 interpreted to mean simply "one or more bit errors were
159 corrected". Its new interpretation can be phrased as "a
160 dangerously high number of bit errors were corrected on one or
161 more regions comprising an ecc step". The precise definition of
162 "dangerously high" can be adjusted by the user with
163 bitflip_threshold. Users are discouraged from doing this,
164 however, unless they know what they are doing and have intimate
165 knowledge of the properties of their device. Broadly speaking,
166 bitflip_threshold should be low enough to detect genuine erase
167 block degradation, but high enough to avoid the consequences of
168 a persistent return value of -EUCLEAN on devices where sticky
169 bitflips occur. Note that if bitflip_threshold exceeds
170 ecc_strength, -EUCLEAN is never returned by mtd_read().
171 Conversely, if bitflip_threshold is zero, -EUCLEAN is always
172 returned, absent a hard error.
173
174 This is generally applicable only to NAND flash devices with ECC
175 capability. It is ignored on devices lacking ECC capability;
176 i.e., devices for which ecc_strength is zero.
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 0c674be0d3c6..e0aedb7a7827 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -1119,8 +1119,6 @@ in this page</entry>
1119 These constants are defined in nand.h. They are ored together to describe 1119 These constants are defined in nand.h. They are ored together to describe
1120 the chip functionality. 1120 the chip functionality.
1121 <programlisting> 1121 <programlisting>
1122/* Chip can not auto increment pages */
1123#define NAND_NO_AUTOINCR 0x00000001
1124/* Buswitdh is 16 bit */ 1122/* Buswitdh is 16 bit */
1125#define NAND_BUSWIDTH_16 0x00000002 1123#define NAND_BUSWIDTH_16 0x00000002
1126/* Device supports partial programming without padding */ 1124/* Device supports partial programming without padding */
diff --git a/Documentation/devicetree/bindings/mtd/gpmi-nand.txt b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
new file mode 100644
index 000000000000..1a5bbd346d22
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
@@ -0,0 +1,33 @@
1* Freescale General-Purpose Media Interface (GPMI)
2
3The GPMI nand controller provides an interface to control the
4NAND flash chips. We support only one NAND chip now.
5
6Required properties:
7 - compatible : should be "fsl,<chip>-gpmi-nand"
8 - reg : should contain registers location and length for gpmi and bch.
9 - reg-names: Should contain the reg names "gpmi-nand" and "bch"
10 - interrupts : The first is the DMA interrupt number for GPMI.
11 The second is the BCH interrupt number.
12 - interrupt-names : The interrupt names "gpmi-dma", "bch";
13 - fsl,gpmi-dma-channel : Should contain the dma channel it uses.
14
15The device tree may optionally contain sub-nodes describing partitions of the
16address space. See partition.txt for more detail.
17
18Examples:
19
20gpmi-nand@8000c000 {
21 compatible = "fsl,imx28-gpmi-nand";
22 #address-cells = <1>;
23 #size-cells = <1>;
24 reg = <0x8000c000 2000>, <0x8000a000 2000>;
25 reg-names = "gpmi-nand", "bch";
26 interrupts = <88>, <41>;
27 interrupt-names = "gpmi-dma", "bch";
28 fsl,gpmi-dma-channel = <4>;
29
30 partition@0 {
31 ...
32 };
33};
diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.txt b/Documentation/devicetree/bindings/mtd/mxc-nand.txt
new file mode 100644
index 000000000000..b5833d11c7be
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/mxc-nand.txt
@@ -0,0 +1,19 @@
1* Freescale's mxc_nand
2
3Required properties:
4- compatible: "fsl,imxXX-nand"
5- reg: address range of the nfc block
6- interrupts: irq to be used
7- nand-bus-width: see nand.txt
8- nand-ecc-mode: see nand.txt
9- nand-on-flash-bbt: see nand.txt
10
11Example:
12
13 nand@d8000000 {
14 compatible = "fsl,imx27-nand";
15 reg = <0xd8000000 0x1000>;
16 interrupts = <29>;
17 nand-bus-width = <8>;
18 nand-ecc-mode = "hw";
19 };