@@ -227,6 +227,16 @@ config OLD_SUNXI_KERNEL_COMPAT
Set this to enable various workarounds for old kernels, this results in
sub-optimal settings for newer kernels, only enable if needed.
+config SUNXI_NAND
+ bool "Support for NAND on Allwinner A20"
+ depends on MACH_SUN7I
+ ---help---
+ Enable support for internal NAND. This option allows U-Boot to read from
+ sunxi NAND using DMA transfers. It also adds the a20_nandread command
+ that allows user to transfer a specified amount of data from NAND to
+ memory. Both SPL and full U-Boot driver are enabled. Writing is not
+ supported.
+
config MMC0_CD_PIN
string "Card detect pin for mmc0"
default ""
@@ -139,6 +139,17 @@
#define CONFIG_INITRD_TAG
#define CONFIG_SERIAL_TAG
+#if defined(CONFIG_SUNXI_NAND)
+#define CONFIG_SPL_NAND_DRIVERS
+#define CONFIG_SPL_NAND_SUPPORT
+#define CONFIG_CMD_SPL_WRITE_SIZE 0x000400 /* 1024 byte */
+
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
+#define CONFIG_SYS_NAND_PAGE_SIZE 0x002000 /* 8kb*/
+#define CONFIG_SUNXI_ECC_STRENGTH 40
+#endif
+
/* mmc config */
#if !defined(CONFIG_UART0_PORT_F)
#define CONFIG_MMC