]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
petalinux-auto-board.h.template: Add Nand detection
authorJason Wu <j.wu@xilinx.com>
Tue, 19 Feb 2013 05:55:00 +0000 (15:55 +1000)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 4 Mar 2013 17:35:08 +0000 (18:35 +0100)
and define the required variables

Signed-off-by: Jason Wu <huanyu@xilinx.com>
include/configs/petalinux-auto-board.h.template

index f2ee23e4325834873ff0043d71be2f756a0f5023..7f87525e0dcf2eb43489f4efda27c53c2d292087 100644 (file)
 /* 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
        #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