1config MTD_NAND_ECC
2	tristate
3
4config MTD_NAND_ECC_SMC
5	bool "NAND ECC Smart Media byte order"
6	depends on MTD_NAND_ECC
7	default n
8	help
9	  Software ECC according to the Smart Media Specification.
10	  The original Linux implementation had byte 0 and 1 swapped.
11
12
13menuconfig MTD_NAND
14	tristate "NAND Device Support"
15	depends on MTD
16	select MTD_NAND_IDS
17	select MTD_NAND_ECC
18	help
19	  This enables support for accessing all type of NAND flash
20	  devices. For further information see
21	  <http://www.linux-mtd.infradead.org/doc/nand.html>.
22
23if MTD_NAND
24
25config MTD_NAND_VERIFY_WRITE
26	bool "Verify NAND page writes"
27	help
28	  This adds an extra check when data is written to the flash. The
29	  NAND flash device internally checks only bits transitioning
30	  from 1 to 0. There is a rare possibility that even though the
31	  device thinks the write was successful, a bit could have been
32	  flipped accidentally due to device wear or something else.
33
34config MTD_NAND_BCH
35	tristate
36	select BCH
37	depends on MTD_NAND_ECC_BCH
38	default MTD_NAND
39
40config MTD_NAND_ECC_BCH
41	bool "Support software BCH ECC"
42	default n
43	help
44	  This enables support for software BCH error correction. Binary BCH
45	  codes are more powerful and cpu intensive than traditional Hamming
46	  ECC codes. They are used with NAND devices requiring more than 1 bit
47	  of error correction.
48
49config MTD_SM_COMMON
50	tristate
51	default n
52
53config MTD_NAND_MUSEUM_IDS
54	bool "Enable chip ids for obsolete ancient NAND devices"
55	default n
56	help
57	  Enable this option only when your board has first generation
58	  NAND chips (page size 256 byte, erase size 4-8KiB). The IDs
59	  of these chips were reused by later, larger chips.
60
61config MTD_NAND_AUTCPU12
62	tristate "SmartMediaCard on autronix autcpu12 board"
63	depends on ARCH_AUTCPU12
64	help
65	  This enables the driver for the autronix autcpu12 board to
66	  access the SmartMediaCard.
67
68config MTD_NAND_DENALI
69       depends on PCI
70        tristate "Support Denali NAND controller on Intel Moorestown"
71        help
72          Enable the driver for NAND flash on Intel Moorestown, using the
73          Denali NAND controller core.
74
75config MTD_NAND_DENALI_SCRATCH_REG_ADDR
76        hex "Denali NAND size scratch register address"
77        default "0xFF108018"
78        depends on MTD_NAND_DENALI
79        help
80          Some platforms place the NAND chip size in a scratch register
81          because (some versions of) the driver aren't able to automatically
82          determine the size of certain chips. Set the address of the
83          scratch register here to enable this feature. On Intel Moorestown
84          boards, the scratch register is at 0xFF108018.
85
86config MTD_NAND_H1900
87	tristate "iPAQ H1900 flash"
88	depends on ARCH_PXA && BROKEN
89	help
90	  This enables the driver for the iPAQ h1900 flash.
91
92config MTD_NAND_GPIO
93	tristate "GPIO NAND Flash driver"
94	depends on GENERIC_GPIO && ARM
95	help
96	  This enables a GPIO based NAND flash driver.
97
98config MTD_NAND_SPIA
99	tristate "NAND Flash device on SPIA board"
100	depends on ARCH_P720T
101	help
102	  If you had to ask, you don't have one. Say 'N'.
103
104config MTD_NAND_AMS_DELTA
105	tristate "NAND Flash device on Amstrad E3"
106	depends on MACH_AMS_DELTA
107	default y
108	help
109	  Support for NAND flash on Amstrad E3 (Delta).
110
111config MTD_NAND_OMAP2
112	tristate "NAND Flash device on OMAP2, OMAP3 and OMAP4"
113	depends on ARCH_OMAP2PLUS
114	help
115          Support for NAND flash on Texas Instruments OMAP2, OMAP3 and OMAP4
116	  platforms.
117
118config MTD_NAND_IDS
119	tristate
120
121config MTD_NAND_RICOH
122	tristate "Ricoh xD card reader"
123	default n
124	depends on PCI
125	select MTD_SM_COMMON
126	help
127	  Enable support for Ricoh R5C852 xD card reader
128	  You also need to enable ether
129	  NAND SSFDC (SmartMedia) read only translation layer' or new
130	  expermental, readwrite
131	  'SmartMedia/xD new translation layer'
132
133config MTD_NAND_AU1550
134	tristate "Au1550/1200 NAND support"
135	depends on MIPS_ALCHEMY
136	help
137	  This enables the driver for the NAND flash controller on the
138	  AMD/Alchemy 1550 SOC.
139
140config MTD_NAND_BF5XX
141	tristate "Blackfin on-chip NAND Flash Controller driver"
142	depends on BF54x || BF52x
143	help
144	  This enables the Blackfin on-chip NAND flash controller
145
146	  No board specific support is done by this driver, each board
147	  must advertise a platform_device for the driver to attach.
148
149	  This driver can also be built as a module. If so, the module
150	  will be called bf5xx-nand.
151
152config MTD_NAND_BF5XX_HWECC
153	bool "BF5XX NAND Hardware ECC"
154	default y
155	depends on MTD_NAND_BF5XX
156	help
157	  Enable the use of the BF5XX's internal ECC generator when
158	  using NAND.
159
160config MTD_NAND_BF5XX_BOOTROM_ECC
161	bool "Use Blackfin BootROM ECC Layout"
162	default n
163	depends on MTD_NAND_BF5XX_HWECC
164	help
165	  If you wish to modify NAND pages and allow the Blackfin on-chip
166	  BootROM to boot from them, say Y here.  This is only necessary
167	  if you are booting U-Boot out of NAND and you wish to update
168	  U-Boot from Linux' userspace.  Otherwise, you should say N here.
169
170	  If unsure, say N.
171
172config MTD_NAND_RTC_FROM4
173	tristate "Renesas Flash ROM 4-slot interface board (FROM_BOARD4)"
174	depends on SH_SOLUTION_ENGINE
175	select REED_SOLOMON
176	select REED_SOLOMON_DEC8
177	select BITREVERSE
178	help
179	  This enables the driver for the Renesas Technology AG-AND
180	  flash interface board (FROM_BOARD4)
181
182config MTD_NAND_PPCHAMELEONEVB
183	tristate "NAND Flash device on PPChameleonEVB board"
184	depends on PPCHAMELEONEVB && BROKEN
185	help
186	  This enables the NAND flash driver on the PPChameleon EVB Board.
187
188config MTD_NAND_S3C2410
189	tristate "NAND Flash support for Samsung S3C SoCs"
190	depends on ARCH_S3C24XX || ARCH_S3C64XX
191	help
192	  This enables the NAND flash controller on the S3C24xx and S3C64xx
193	  SoCs
194
195	  No board specific support is done by this driver, each board
196	  must advertise a platform_device for the driver to attach.
197
198config MTD_NAND_S3C2410_DEBUG
199	bool "Samsung S3C NAND driver debug"
200	depends on MTD_NAND_S3C2410
201	help
202	  Enable debugging of the S3C NAND driver
203
204config MTD_NAND_S3C2410_HWECC
205	bool "Samsung S3C NAND Hardware ECC"
206	depends on MTD_NAND_S3C2410
207	help
208	  Enable the use of the controller's internal ECC generator when
209	  using NAND. Early versions of the chips have had problems with
210	  incorrect ECC generation, and if using these, the default of
211	  software ECC is preferable.
212
213config MTD_NAND_NDFC
214	tristate "NDFC NanD Flash Controller"
215	depends on 4xx
216	select MTD_NAND_ECC_SMC
217	help
218	 NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs
219
220config MTD_NAND_S3C2410_CLKSTOP
221	bool "Samsung S3C NAND IDLE clock stop"
222	depends on MTD_NAND_S3C2410
223	default n
224	help
225	  Stop the clock to the NAND controller when there is no chip
226	  selected to save power. This will mean there is a small delay
227	  when the is NAND chip selected or released, but will save
228	  approximately 5mA of power when there is nothing happening.
229
230config MTD_NAND_BCM_UMI
231	tristate "NAND Flash support for BCM Reference Boards"
232	depends on ARCH_BCMRING
233	help
234	  This enables the NAND flash controller on the BCM UMI block.
235
236	  No board specific support is done by this driver, each board
237	  must advertise a platform_device for the driver to attach.
238
239config MTD_NAND_BCM_UMI_HWCS
240	bool "BCM UMI NAND Hardware CS"
241	depends on MTD_NAND_BCM_UMI
242	help
243	  Enable the use of the BCM UMI block's internal CS using NAND.
244	  This should only be used if you know the external NAND CS can toggle.
245
246config MTD_NAND_DISKONCHIP
247	tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation) (EXPERIMENTAL)"
248	depends on EXPERIMENTAL
249	depends on HAS_IOMEM
250	select REED_SOLOMON
251	select REED_SOLOMON_DEC16
252	help
253	  This is a reimplementation of M-Systems DiskOnChip 2000,
254	  Millennium and Millennium Plus as a standard NAND device driver,
255	  as opposed to the earlier self-contained MTD device drivers.
256	  This should enable, among other things, proper JFFS2 operation on
257	  these devices.
258
259config MTD_NAND_DISKONCHIP_PROBE_ADVANCED
260        bool "Advanced detection options for DiskOnChip"
261        depends on MTD_NAND_DISKONCHIP
262        help
263          This option allows you to specify nonstandard address at which to
264          probe for a DiskOnChip, or to change the detection options.  You
265          are unlikely to need any of this unless you are using LinuxBIOS.
266          Say 'N'.
267
268config MTD_NAND_DISKONCHIP_PROBE_ADDRESS
269        hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
270        depends on MTD_NAND_DISKONCHIP
271        default "0"
272        ---help---
273        By default, the probe for DiskOnChip devices will look for a
274        DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
275        This option allows you to specify a single address at which to probe
276        for the device, which is useful if you have other devices in that
277        range which get upset when they are probed.
278
279        (Note that on PowerPC, the normal probe will only check at
280        0xE4000000.)
281
282        Normally, you should leave this set to zero, to allow the probe at
283        the normal addresses.
284
285config MTD_NAND_DISKONCHIP_PROBE_HIGH
286        bool "Probe high addresses"
287        depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED
288        help
289          By default, the probe for DiskOnChip devices will look for a
290          DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
291          This option changes to make it probe between 0xFFFC8000 and
292          0xFFFEE000.  Unless you are using LinuxBIOS, this is unlikely to be
293          useful to you.  Say 'N'.
294
295config MTD_NAND_DISKONCHIP_BBTWRITE
296	bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP"
297	depends on MTD_NAND_DISKONCHIP
298	help
299	  On DiskOnChip devices shipped with the INFTL filesystem (Millennium
300	  and 2000 TSOP/Alon), Linux reserves some space at the end of the
301	  device for the Bad Block Table (BBT).  If you have existing INFTL
302	  data on your device (created by non-Linux tools such as M-Systems'
303	  DOS drivers), your data might overlap the area Linux wants to use for
304	  the BBT.  If this is a concern for you, leave this option disabled and
305	  Linux will not write BBT data into this area.
306	  The downside of leaving this option disabled is that if bad blocks
307	  are detected by Linux, they will not be recorded in the BBT, which
308	  could cause future problems.
309	  Once you enable this option, new filesystems (INFTL or others, created
310	  in Linux or other operating systems) will not use the reserved area.
311	  The only reason not to enable this option is to prevent damage to
312	  preexisting filesystems.
313	  Even if you leave this disabled, you can enable BBT writes at module
314	  load time (assuming you build diskonchip as a module) with the module
315	  parameter "inftl_bbt_write=1".
316
317config MTD_NAND_DOCG4
318	tristate "Support for DiskOnChip G4 (EXPERIMENTAL)"
319	depends on EXPERIMENTAL
320	select BCH
321	select BITREVERSE
322	help
323	  Support for diskonchip G4 nand flash, found in various smartphones and
324	  PDAs, among them the Palm Treo680, HTC Prophet and Wizard, Toshiba
325	  Portege G900, Asus P526, and O2 XDA Zinc.
326
327	  With this driver you will be able to use UBI and create a ubifs on the
328	  device, so you may wish to consider enabling UBI and UBIFS as well.
329
330	  These devices ship with the Mys/Sandisk SAFTL formatting, for which
331	  there is currently no mtd parser, so you may want to use command line
332	  partitioning to segregate write-protected blocks. On the Treo680, the
333	  first five erase blocks (256KiB each) are write-protected, followed
334	  by the block containing the saftl partition table.  This is probably
335	  typical.
336
337config MTD_NAND_SHARPSL
338	tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
339	depends on ARCH_PXA
340
341config MTD_NAND_CAFE
342	tristate "NAND support for OLPC CAFÉ chip"
343	depends on PCI
344	select REED_SOLOMON
345	select REED_SOLOMON_DEC16
346	help
347	  Use NAND flash attached to the CAFÉ chip designed for the OLPC
348	  laptop.
349
350config MTD_NAND_CS553X
351	tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
352	depends on X86_32
353	help
354	  The CS553x companion chips for the AMD Geode processor
355	  include NAND flash controllers with built-in hardware ECC
356	  capabilities; enabling this option will allow you to use
357	  these. The driver will check the MSRs to verify that the
358	  controller is enabled for NAND, and currently requires that
359	  the controller be in MMIO mode.
360
361	  If you say "m", the module will be called cs553x_nand.
362
363config MTD_NAND_ATMEL
364	tristate "Support for NAND Flash / SmartMedia on AT91 and AVR32"
365	depends on ARCH_AT91 || AVR32
366	help
367	  Enables support for NAND Flash / Smart Media Card interface
368	  on Atmel AT91 and AVR32 processors.
369choice
370	prompt "ECC management for NAND Flash / SmartMedia on AT91 / AVR32"
371	depends on MTD_NAND_ATMEL
372
373config MTD_NAND_ATMEL_ECC_HW
374	bool "Hardware ECC"
375	depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9260 || AVR32
376	help
377	  Use hardware ECC instead of software ECC when the chip
378	  supports it.
379
380	  The hardware ECC controller is capable of single bit error
381	  correction and 2-bit random detection per page.
382
383	  NB : hardware and software ECC schemes are incompatible.
384	  If you switch from one to another, you'll have to erase your
385	  mtd partition.
386
387	  If unsure, say Y
388
389config MTD_NAND_ATMEL_ECC_SOFT
390	bool "Software ECC"
391	help
392	  Use software ECC.
393
394	  NB : hardware and software ECC schemes are incompatible.
395	  If you switch from one to another, you'll have to erase your
396	  mtd partition.
397
398config MTD_NAND_ATMEL_ECC_NONE
399	bool "No ECC (testing only, DANGEROUS)"
400	depends on DEBUG_KERNEL
401	help
402	  No ECC will be used.
403	  It's not a good idea and it should be reserved for testing
404	  purpose only.
405
406	  If unsure, say N
407
408endchoice
409
410config MTD_NAND_PXA3xx
411	tristate "Support for NAND flash devices on PXA3xx"
412	depends on PXA3xx || ARCH_MMP
413	help
414	  This enables the driver for the NAND flash device found on
415	  PXA3xx processors
416
417config MTD_NAND_CM_X270
418	tristate "Support for NAND Flash on CM-X270 modules"
419	depends on MACH_ARMCORE
420
421config MTD_NAND_PASEMI
422	tristate "NAND support for PA Semi PWRficient"
423	depends on PPC_PASEMI
424	help
425	  Enables support for NAND Flash interface on PA Semi PWRficient
426	  based boards
427
428config MTD_NAND_TMIO
429	tristate "NAND Flash device on Toshiba Mobile IO Controller"
430	depends on MFD_TMIO
431	help
432	  Support for NAND flash connected to a Toshiba Mobile IO
433	  Controller in some PDAs, including the Sharp SL6000x.
434
435config MTD_NAND_NANDSIM
436	tristate "Support for NAND Flash Simulator"
437	help
438	  The simulator may simulate various NAND flash chips for the
439	  MTD nand layer.
440
441config MTD_NAND_GPMI_NAND
442        bool "GPMI NAND Flash Controller driver"
443        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28)
444        help
445	 Enables NAND Flash support for IMX23 or IMX28.
446	 The GPMI controller is very powerful, with the help of BCH
447	 module, it can do the hardware ECC. The GPMI supports several
448	 NAND flashs at the same time. The GPMI may conflicts with other
449	 block, such as SD card. So pay attention to it when you enable
450	 the GPMI.
451
452config MTD_NAND_PLATFORM
453	tristate "Support for generic platform NAND driver"
454	depends on HAS_IOMEM
455	help
456	  This implements a generic NAND driver for on-SOC platform
457	  devices. You will need to provide platform-specific functions
458	  via platform_data.
459
460config MTD_ALAUDA
461	tristate "MTD driver for Olympus MAUSB-10 and Fujifilm DPC-R1"
462	depends on USB
463	help
464	  These two (and possibly other) Alauda-based cardreaders for
465	  SmartMedia and xD allow raw flash access.
466
467config MTD_NAND_ORION
468	tristate "NAND Flash support for Marvell Orion SoC"
469	depends on PLAT_ORION
470	help
471	  This enables the NAND flash controller on Orion machines.
472
473	  No board specific support is done by this driver, each board
474	  must advertise a platform_device for the driver to attach.
475
476config MTD_NAND_FSL_ELBC
477	tristate "NAND support for Freescale eLBC controllers"
478	depends on PPC_OF
479	select FSL_LBC
480	help
481	  Various Freescale chips, including the 8313, include a NAND Flash
482	  Controller Module with built-in hardware ECC capabilities.
483	  Enabling this option will enable you to use this to control
484	  external NAND devices.
485
486config MTD_NAND_FSL_IFC
487	tristate "NAND support for Freescale IFC controller"
488	depends on MTD_NAND && FSL_SOC
489	select FSL_IFC
490	help
491	  Various Freescale chips e.g P1010, include a NAND Flash machine
492	  with built-in hardware ECC capabilities.
493	  Enabling this option will enable you to use this to control
494	  external NAND devices.
495
496config MTD_NAND_FSL_UPM
497	tristate "Support for NAND on Freescale UPM"
498	depends on PPC_83xx || PPC_85xx
499	select FSL_LBC
500	help
501	  Enables support for NAND Flash chips wired onto Freescale PowerPC
502	  processor localbus with User-Programmable Machine support.
503
504config MTD_NAND_MPC5121_NFC
505	tristate "MPC5121 built-in NAND Flash Controller support"
506	depends on PPC_MPC512x
507	help
508	  This enables the driver for the NAND flash controller on the
509	  MPC5121 SoC.
510
511config MTD_NAND_MXC
512	tristate "MXC NAND support"
513	depends on IMX_HAVE_PLATFORM_MXC_NAND
514	help
515	  This enables the driver for the NAND flash controller on the
516	  MXC processors.
517
518config MTD_NAND_NOMADIK
519	tristate "ST Nomadik 8815 NAND support"
520	depends on ARCH_NOMADIK
521	help
522	  Driver for the NAND flash controller on the Nomadik, with ECC.
523
524config MTD_NAND_SH_FLCTL
525	tristate "Support for NAND on Renesas SuperH FLCTL"
526	depends on SUPERH || ARCH_SHMOBILE
527	help
528	  Several Renesas SuperH CPU has FLCTL. This option enables support
529	  for NAND Flash using FLCTL.
530
531config MTD_NAND_DAVINCI
532        tristate "Support NAND on DaVinci SoC"
533        depends on ARCH_DAVINCI
534        help
535	  Enable the driver for NAND flash chips on Texas Instruments
536	  DaVinci processors.
537
538config MTD_NAND_TXX9NDFMC
539	tristate "NAND Flash support for TXx9 SoC"
540	depends on SOC_TX4938 || SOC_TX4939
541	help
542	  This enables the NAND flash controller on the TXx9 SoCs.
543
544config MTD_NAND_SOCRATES
545	tristate "Support for NAND on Socrates board"
546	depends on SOCRATES
547	help
548	  Enables support for NAND Flash chips wired onto Socrates board.
549
550config MTD_NAND_NUC900
551	tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
552	depends on ARCH_W90X900
553	help
554	  This enables the driver for the NAND Flash on evaluation board based
555	  on w90p910 / NUC9xx.
556
557config MTD_NAND_JZ4740
558	tristate "Support for JZ4740 SoC NAND controller"
559	depends on MACH_JZ4740
560	help
561		Enables support for NAND Flash on JZ4740 SoC based boards.
562
563config MTD_NAND_FSMC
564	tristate "Support for NAND on ST Micros FSMC"
565	depends on PLAT_SPEAR || PLAT_NOMADIK || MACH_U300
566	help
567	  Enables support for NAND Flash chips on the ST Microelectronics
568	  Flexible Static Memory Controller (FSMC)
569
570endif # MTD_NAND
571