From: Piotr Zierhoffer <piotr.zierhof...@cs.put.poznan.pl> When SUNXI_NAND 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 <pgie...@antmicro.com> Signed-off-by: Tomasz Gorochowik <tgorocho...@antmicro.com> Signed-off-by: Mateusz Holenko <mhole...@antmicro.com> Signed-off-by: Piotr Zierhoffer <pzierhof...@antmicro.com> --- board/sunxi/Kconfig | 10 ++++++++++ include/configs/sunxi-common.h | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 2a1cd3c..3b76d64 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -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 "" diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 9576bc1..83922ab 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -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 -- 2.3.6 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot