From 960caeba8f76baffc7201b7535de964f406d48b3 Mon Sep 17 00:00:00 2001 From: Piotr Zierhoffer Date: Thu, 23 Jul 2015 14:33:03 +0200 Subject: sunxi: nand: Add board configuration options When SPL_NAND_SUNXI option is selected in config, set some configuration options for sunxi NAND. This commit also introduces the configurable options in Kconfig. Signed-off-by: Peter Gielda Signed-off-by: Tomasz Gorochowik Signed-off-by: Mateusz Holenko Signed-off-by: Piotr Zierhoffer Signed-off-by: Karol Gugala Acked-by: Hans de Goede Signed-off-by: Hans de Goede --- drivers/mtd/nand/Kconfig | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'drivers/mtd/nand') diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 3024357..41ebfea 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -85,6 +85,46 @@ config SPL_NAND_DENALI This is a small implementation of the Denali NAND controller for use on SPL. +config SPL_NAND_SUNXI + bool "Support for NAND on Allwinner A20 in SPL" + depends on MACH_SUN7I + ---help--- + Enable support for NAND. This option allows SPL to read from + sunxi NAND using DMA transfers. + Depending on the NAND chip, values like ECC strength and page sizes + have to be configured. + +config NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END + hex "Size of syndrome partitions in sunxi NAND" + default 0x400000 + depends on SPL_NAND_SUNXI + ---help--- + End address for boot partitions on NAND. Those partitions have a + different random seed that has to match the sunxi BROM setting. + +config NAND_SUNXI_SPL_ECC_STRENGTH + int "ECC Strength for sunxi NAND" + default 40 + depends on SPL_NAND_SUNXI + ---help--- + ECC strength used by the sunxi NAND SPL driver. This is specific to the + chosen NAND chip and has to match the value used by the sunxi BROM. + +config NAND_SUNXI_SPL_ECC_PAGE_SIZE + hex "ECC page size for sunxi NAND" + default 0x400 + depends on SPL_NAND_SUNXI + ---help--- + ECC page size used by the sunxi NAND SPL driver for syndrome partitions. + This setting has to match the value used by the sunxi BROM. + +config NAND_SUNXI_SPL_PAGE_SIZE + hex "Page size for sunxi NAND" + default 0x2000 + depends on SPL_NAND_SUNXI + ---help--- + Page size of the NAND flash used by the sunxi NAND SPL driver. This is + specific to the chosen NAND chip. endif endmenu -- cgit v1.1