From e3f0df039c2341cc6df4da1907e8e43c71ec1fe2 Mon Sep 17 00:00:00 2001 From: Jason Wu Date: Tue, 19 Feb 2013 15:55:00 +1000 Subject: [PATCH] petalinux-auto-board.h.template: Add Nand detection and define the required variables Signed-off-by: Jason Wu --- .../configs/petalinux-auto-board.h.template | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/configs/petalinux-auto-board.h.template b/include/configs/petalinux-auto-board.h.template index f2ee23e4325..7f87525e0dc 100644 --- a/include/configs/petalinux-auto-board.h.template +++ b/include/configs/petalinux-auto-board.h.template @@ -269,7 +269,7 @@ /* Features that not been implemented due to hw support */ #elif defined(ZYNQ_BOOT_NOR) && defined(XILINX_PS7_NOR_BASEADDR) #define XILINX_FLASH_START XILINX_PS7_NOR_FLASH_BASEADDR -#elif defined(ZYNQ_BOOT_NAND) && defined(XILINX_PS7_NAND_BASEADDR) +#elif defined(ZYNQ_BOOT_NAND) && defined(XILINX_PS7_NAND_FLASH_BASEADDR) #define XILINX_NAND_FLASH_BASEDDR XILINX_PS7_NAND_FLASH_BASEADDR #elif defined(ZYNQ_BOOT_OTHER) #define RAMENV @@ -342,6 +342,24 @@ #ifndef CONFIG_SPI_FLASH_DEV_USERDEFINED #define CONFIG_SPI_FLASH_@spiflashdev@ #endif +#elif defined(XILINX_NAND_FLASH_BASEDDR) /* NAND Flash */ + #define CONFIG_NAND_FLASH 1 + #define CONFIG_NAND_ZYNQ + #define XILINX_NAND_FLASH_BASEDDR XILINX_PS7_NAND_FLASH_BASEADDR + #define CONFIG_CMD_NAND + #define CONFIG_CMD_NAND_LOCK_UNLOCK + #define CONFIG_SYS_MAX_NAND_DEVICE 1 + #define CONFIG_SYS_NAND_BASE XILINX_NAND_FLASH_BASEDDR + #define XPSS_NAND_BASEADDR XILINX_NAND_FLASH_BASEDDR + #define XPSS_CRTL_PARPORT_BASEADDR XILINX_PS7_SMC_BASEADDR + + #define CONFIG_SYS_NO_FLASH 1 + #define CONFIG_MTD_DEVICE + #define CONFIG_SYS_NAND_ONFI_DETECTION + + #define CONFIG_ENV_IS_IN_NAND + #define CONFIG_ENV_OFFSET @bestart@ + #define CONFIG_ENV_SIZE @besize@ #else /* No flash memory at all */ /* ENV in RAM */ #define RAMENV -- 2.47.3