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