#
# drivers/mtd/nand/hinfc610/Kconfig
# add by caizhiyong 2010.11.04
#

menuconfig MTD_NAND_HINFC610
	tristate "Hisilicon NAND Controller v610 device Support"
	depends on MTD_NAND
	default y if (ARCH_HI3536 || ARCH_HI3531A)
	select YAFFS_FS
	select MISC_FILESYSTEMS
	select MTD_BLOCK
	select YAFFS_YAFFS2
	help
	  When the config is set, the kernel will support Hisilicon
	  NAND Controller v610 device. It means that the kernel would
	  control the nand flash with the nand controller v610 device
	  in operation.

if MTD_NAND_HINFC610

config HINFC610_REG_BASE_ADDRESS
	hex "nand controller's register base address"
	default 0x10000000 if ARCH_HI3536
	default 0x10010000 if ARCH_HI3531A
	help
	  register base address of nand controller

config HINFC610_BUFFER_BASE_ADDRESS
	hex "nand controller's buffer base address"
	default 0x16000000 if ARCH_HI3536
	default 0x15000000 if ARCH_HI3531A
	help
	  buffer base address of nand controller

config HINFC610_MAX_CHIP
	int "number of nand flash chip (1,4)"
	default 1
	help
	  nand controller v610 device only support 1 or 2 nand flash chip,
	  your should not config other value.

config HINFC610_DBG_NAND_DEBUG
	bool "Debug: create debug file to control debug type"
	default y
	help
	  When the config is set, the kernel will add the "debug" file
	  to control debug type. When the config is set, we could choose
	  the debugging type to display the informations of the nand controller
	  v610 device in operation.

config HINFC610_DBG_NAND_DUMP
	bool "Debug: display read/write/erase process nand data"
	depends on HINFC610_DBG_NAND_DEBUG
	default y
	default n if ARCH_HI3531A
	help
	  When the config is set, the kernel will add "dump" file to
	  display all nand operation and data.When the "HINFC610_DBG_NAND_DEBUG"
	  has been set, the nand controller v610 device will display
	  all the operations and data.

config HINFC610_DBG_NAND_ERASE_COUNT
	bool "Debug: display last erase count"
	depends on HINFC610_DBG_NAND_DEBUG
	default y
	default n if ARCH_HI3531A
	help
	  When the config is set, the kernel will add "erase_count" file
	  to display last erase count. When the "HINFC610_DBG_NAND_DEBUG"
	  has been set, the nand controller v610 device will display
	  the last erase count.

config HINFC610_DBG_NAND_ECC_COUNT
	bool "Debug: display last ecc count."
	depends on HINFC610_DBG_NAND_DEBUG
	default y
	default n if ARCH_HI3531A
	help
	  When the config is set, the kernel will add "ecc_count"
	  to display last ecc count. When the "HINFC610_DBG_NAND_DEBUG"
	  has been set, the nand controller v610 device will display
	  the last ecc count.

config HINFC610_DBG_NAND_READ_RETRY
	bool "Debug: display read_retry process"
	depends on HINFC610_DBG_NAND_DEBUG
	default y
	default n if ARCH_HI3531A
	help
	  When the config is set, the kernel will add read_retry file
	  to display read_retry process.

choice
	prompt "Pagesize and Ecc Type Select"
	default HINFC610_AUTO_PAGESIZE_ECC if ARCH_HI3531A

config HINFC610_AUTO_PAGESIZE_ECC
	bool "Auto"
	help
	  When the config is set, pagesize and ecc type will use
	  hardware config. When we replace the flash, the
	  controller will identify the pagesize and ecc type of
	  the flash.

config HINFC610_PAGESIZE_AUTO_ECC_NONE
	bool "Pagesize Auto, Ecc None"
	help
	  select pagesize 2K, ecc none.

endchoice

endif # MTD_NAND_HINFC610
