]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sunxi: nand: Add board configuration options
authorPiotr Zierhoffer <pzierhoffer@antmicro.com>
Thu, 23 Jul 2015 12:33:03 +0000 (14:33 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:39 +0000 (08:17 +0200)
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 <pgielda@antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/mtd/nand/Kconfig
include/configs/sunxi-common.h

index 0d797e21da6fbaba6521eea57b680eea19c9783c..507e6a9c0a5d6bb2fd539eab392918a90ed3855f 100644 (file)
@@ -91,6 +91,46 @@ config SPL_NAND_DENALI
          This is a small implementation of the Denali NAND controller
          for use on SPL.
 
          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
 
 config NAND_ATMEL
 endif
 
 config NAND_ATMEL
index edcacd5c1487db110178f0edd2e14c93f6ac277a..71b23689528001d283e0c1d2302690b122af34e0 100644 (file)
 #define CONFIG_INITRD_TAG
 #define CONFIG_SERIAL_TAG
 
 #define CONFIG_INITRD_TAG
 #define CONFIG_SERIAL_TAG
 
+#if defined(CONFIG_SPL_NAND_SUNXI)
+#define CONFIG_SPL_NAND_DRIVERS
+#define CONFIG_SPL_NAND_SUPPORT
+
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
+
+#endif
+
+
 /* mmc config */
 #if !defined(CONFIG_UART0_PORT_F)
 #define CONFIG_MMC
 /* mmc config */
 #if !defined(CONFIG_UART0_PORT_F)
 #define CONFIG_MMC