@@ -334,7 +334,7 @@ Active arm armv7 omap3 ti
evm
Active arm armv7 omap3 ti evm
omap3_evm_quick_nand -
Active arm armv7 omap3 ti
sdp3430 omap3_sdp3430 -
Active arm armv7 omap3 timll
devkit8000 devkit8000 -
-Active arm armv7 omap4 ti panda
omap4_panda -
+Active arm armv7 omap4 ti panda
omap4_panda omap4_panda:NAND
Active arm armv7 omap4 ti
sdp4430 omap4_sdp4430 -
Active arm armv7 omap5 ti dra7xx
dra7xx_evm
dra7xx_evm:CONS_INDEX=1
Active arm armv7 omap5 ti dra7xx
dra7xx_evm_uart3
dra7xx_evm:CONS_INDEX=3,S
>
3. Compiling for omap4 boards now gives an error about
"asm/arch/mem.h" missing. A simple work-around is to copy over the
file from the omap3 directory (command below)
> cp arch/arm/include/asm/arch-omap3/mem.h arch/arm/include/asm/arch-omap4/mem.h
4. At this point we'll get some complaints about missing static
definitions, so apply the following patch to add them in the common
configuration file;
@@ -154,4 +154,49 @@
#define CONFIG_SPL_DISPLAY_PRINT
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#ifdef CONFIG_NAND
+#define CONFIG_NAND_OMAP_GPMC
+#define CONFIG_NAND_OMAP_ELM
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
+ CONFIG_SYS_NAND_PAGE_SIZE)
+#define CONFIG_SYS_NAND_PAGE_SIZE 2048
+#define CONFIG_SYS_NAND_OOBSIZE 64
+#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
+#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
+ 10, 11, 12, 13, 14, 15, 16, 17, \
+ 18, 19, 20, 21, 22, 23, 24, 25, \
+ 26, 27, 28, 29, 30, 31, 32, 33, \
+ 34, 35, 36, 37, 38, 39, 40, 41, \
+ 42, 43, 44, 45, 46, 47, 48, 49, \
+ 50, 51, 52, 53, 54, 55, 56, 57, }
+
+#define CONFIG_SYS_NAND_ECCSIZE 512
+#define CONFIG_SYS_NAND_ECCBYTES 14
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
+#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
+#endif
+
+/* NAND support */
+#ifdef CONFIG_NAND
+#define CONFIG_CMD_NAND
+#if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT)
+#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
+ "128k(SPL.backup1)," \
+ "128k(SPL.backup2)," \
+ "128k(SPL.backup3),1792k(u-boot)," \
+ "128k(u-boot-spl-os)," \
+ "128k(u-boot-env),5m(kernel),-(rootfs)"
+#undef CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */
+#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
+#endif
+#endif
+
#endif /* __CONFIG_OMAP4_COMMON_H */
The following edit is also needed in the panda configuration file (it
won't work from the common file as the panda configuration will
over-ride it)
@@ -45,8 +45,10 @@
/* GPIO */
#define CONFIG_CMD_GPIO
+#ifndef CONFIG_NAND
/* ENV related config options */
#define CONFIG_ENV_IS_NOWHERE
+#endif
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG