Convert CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to Kconfig
[platform/kernel/u-boot.git] / drivers / mtd / nand / raw / Kconfig
index d75f371..da2c579 100644 (file)
@@ -23,6 +23,13 @@ config TPL_SYS_NAND_SELF_INIT
          This option, if enabled, provides more flexible and linux-like
          NAND initialization process, in SPL.
 
+config TPL_NAND_INIT
+       bool
+
+config SYS_MAX_NAND_DEVICE
+       int "Maximum number of NAND devices to support"
+       default 1
+
 config SYS_NAND_DRIVER_ECC_LAYOUT
        bool "Omit standard ECC layouts to save space"
        help
@@ -70,6 +77,7 @@ config PMECC_SECTOR_SIZE
 
 config SPL_GENERATE_ATMEL_PMECC_HEADER
        bool "Atmel PMECC Header Generation"
+       depends on SPL
        select ATMEL_NAND_HWECC
        select ATMEL_NAND_HW_PMECC
        help
@@ -93,13 +101,13 @@ config NAND_BRCMNAND_6368
 
 config NAND_BRCMNAND_6753
        bool "Support Broadcom NAND controller on bcm6753"
-       depends on NAND_BRCMNAND && ARCH_BCM6753
+       depends on NAND_BRCMNAND && BCM6855
        help
          Enable support for broadcom nand driver on bcm6753.
 
 config NAND_BRCMNAND_68360
        bool "Support Broadcom NAND controller on bcm68360"
-       depends on NAND_BRCMNAND && ARCH_BCM68360
+       depends on NAND_BRCMNAND && BCM6856
        help
          Enable support for broadcom nand driver on bcm68360.
 
@@ -111,13 +119,13 @@ config NAND_BRCMNAND_6838
 
 config NAND_BRCMNAND_6858
        bool "Support Broadcom NAND controller on bcm6858"
-       depends on NAND_BRCMNAND && ARCH_BCM6858
+       depends on NAND_BRCMNAND && BCM6858
        help
          Enable support for broadcom nand driver on bcm6858.
 
 config NAND_BRCMNAND_63158
        bool "Support Broadcom NAND controller on bcm63158"
-       depends on NAND_BRCMNAND && ARCH_BCM63158
+       depends on NAND_BRCMNAND && BCM63158
        help
          Enable support for broadcom nand driver on bcm63158.
 
@@ -128,6 +136,10 @@ config NAND_DAVINCI
          Enable this driver for NAND flash controllers available in TI Davinci
          and Keystone2 platforms
 
+config SYS_NAND_4BIT_HW_ECC_OOBFIRST
+       bool "Use 4-bit HW ECC with OOB at the front"
+       depends on NAND_DAVINCI
+
 config KEYSTONE_RBL_NAND
        depends on ARCH_KEYSTONE
        def_bool y
@@ -165,6 +177,7 @@ config NAND_FSL_ELBC_DT
 config NAND_FSL_IFC
        bool "Support Freescale Integrated Flash Controller NAND driver"
        select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
+       select TPL_NAND_INIT if TPL && !TPL_FRAMEWORK
        select SPL_SYS_NAND_SELF_INIT
        select SYS_NAND_SELF_INIT
        select FSL_IFC
@@ -521,12 +534,25 @@ config TEGRA_NAND
        help
          Enables support for NAND Flash chips on Tegra SoCs platforms.
 
+config NAND_MT7621
+       bool "Support for MediaTek MT7621 NAND flash controller"
+       depends on SOC_MT7621
+       select SYS_NAND_SELF_INIT
+       select SPL_SYS_NAND_SELF_INIT
+       imply CMD_NAND
+       help
+         This enables NAND driver for the NAND flash controller on MediaTek
+         MT7621 platform.
+         The controller supports 4~12 bits correction per 512 bytes with a
+         maximum 4KB page size.
+
 comment "Generic NAND options"
 
 config SYS_NAND_BLOCK_SIZE
        hex "NAND chip eraseblock size"
        depends on ARCH_SUNXI || SPL_NAND_SUPPORT || TPL_NAND_SUPPORT
-       depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && !NAND_FSL_IFC
+       depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && \
+               !NAND_FSL_IFC && !NAND_MT7621
        help
          Number of data bytes in one eraseblock for the NAND chip on the
          board. This is the multiple of NAND_PAGE_SIZE and the number of
@@ -551,7 +577,7 @@ config SYS_NAND_PAGE_SIZE
        depends on ARCH_SUNXI || NAND_OMAP_GPMC || NAND_LPC32XX_SLC || \
                SPL_NAND_SIMPLE || (NAND_MXC && SPL_NAND_SUPPORT) || \
                (NAND_ATMEL && SPL_NAND_SUPPORT) || SPL_GENERATE_ATMEL_PMECC_HEADER
-       depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC
+       depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && !NAND_MT7621
        help
          Number of data bytes in one page for the NAND chip on the
          board, not including the OOB area.
@@ -643,7 +669,7 @@ config SYS_NAND_U_BOOT_OFFS_REDUND
 
 config SPL_NAND_AM33XX_BCH
        bool "Enables SPL-NAND driver which supports ELM based"
-       depends on NAND_OMAP_GPMC && !OMAP34XX
+       depends on SPL_NAND_SUPPORT && NAND_OMAP_GPMC && !OMAP34XX
        default y
         help
          Hardware ECC correction. This is useful for platforms which have ELM
@@ -654,6 +680,7 @@ config SPL_NAND_AM33XX_BCH
 
 config SPL_NAND_DENALI
        bool "Support Denali NAND controller for SPL"
+       depends on SPL_NAND_SUPPORT
        help
          This is a small implementation of the Denali NAND controller
          for use on SPL.
@@ -669,7 +696,7 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
 
 config SPL_NAND_SIMPLE
        bool "Use simple SPL NAND driver"
-       depends on !SPL_NAND_AM33XX_BCH
+       depends on !SPL_NAND_AM33XX_BCH && SPL_NAND_SUPPORT
        help
          Support for NAND boot using simple NAND drivers that
          expose the cmd_ctrl() interface.