@@ -85,6 +85,13 @@ 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 internal NAND. This option allows SPL to read from
+ sunxi NAND using DMA transfers. Writing is not supported.
+
endif
endmenu
@@ -139,6 +139,17 @@
#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
+
+#define CONFIG_SYS_NAND_PAGE_SIZE 0x000400 /* 1kb */
+#define CONFIG_SYS_NAND_BLOCK_SIZE 0x002000 /* 8kb*/
+#endif
+
/* mmc config */
#if !defined(CONFIG_UART0_PORT_F)
#define CONFIG_MMC