OMAP3: igep00x0: Add config option to choose flash storage memory
authorJavier Martinez Canillas <javier@dowhile0.org>
Sat, 28 Jul 2012 01:19:32 +0000 (01:19 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 1 Sep 2012 12:58:11 +0000 (14:58 +0200)
IGEP-based boards can have two different flash memories, a OneNAND or a
NAND device. Add a configuration option for to choose which memory to use.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com>
board/isee/igep0020/igep0020.h
board/isee/igep0030/igep0030.h
boards.cfg
include/configs/igep00x0.h

index 3d6e15fb7334c57a4264729a71341717c328954e..3335ecc787d8131441d7cb695a85383f87ecd16b 100644 (file)
 const omap3_sysinfo sysinfo = {
        DDR_STACKED,
        "IGEP v2 board",
+#if defined(CONFIG_ENV_IS_IN_ONENAND)
        "ONENAND",
+#else
+       "NAND",
+#endif
 };
 
 static void setup_net_chip(void);
index b7ce5aa6635295159f5bfdef31d9c8c6fac607f7..a93339daaba8333eca06599e406cd7e97dba25f4 100644 (file)
 const omap3_sysinfo sysinfo = {
        DDR_STACKED,
        "OMAP3 IGEP module",
+#if defined(CONFIG_ENV_IS_IN_ONENAND)
        "ONENAND",
+#else
+       "NAND",
+#endif
 };
 
 /*
index a0009147088f187e004203de3f3100f8501cbb01..47e0c647c7825aac340bc4a8b5aff6c5818149fe 100644 (file)
@@ -229,8 +229,10 @@ cm_t35                       arm         armv7       cm_t35              -
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
 dig297                       arm         armv7       dig297              comelit        omap3
-igep0020                     arm         armv7       igep0020            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020
-igep0030                     arm         armv7       igep0030            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030
+igep0020                     arm         armv7       igep0020            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND
+igep0020_nand                arm         armv7       igep0020            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND
+igep0030                     arm         armv7       igep0030            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND
+igep0030_nand                arm         armv7       igep0030            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
 mt_ventoux                   arm         armv7       mt_ventoux          teejet         omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
index a0a23a79fdf3ae77421471c7f7e36c5edeebfcb8..d8e87c30fd05669485e3c51734f86398b088e01b 100644 (file)
 #define CONFIG_CMD_FAT         /* FAT support                  */
 #define CONFIG_CMD_I2C         /* I2C serial bus support       */
 #define CONFIG_CMD_MMC         /* MMC support                  */
+#ifdef CONFIG_BOOT_ONENAND
 #define CONFIG_CMD_ONENAND     /* ONENAND support              */
+#endif
+#ifdef CONFIG_BOOT_NAND
+#define CONFIG_CMD_NAND
+#endif
 #define CONFIG_CMD_NET         /* bootp, tftpboot, rarpboot    */
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
  * FLASH and environment organization
  */
 
+#ifdef CONFIG_BOOT_ONENAND
 #define PISMO1_ONEN_SIZE               GPMC_SIZE_128M /* Configure the PISMO */
 
 #define CONFIG_SYS_ONENAND_BASE                ONENAND_MAP
 #define CONFIG_ENV_IS_IN_ONENAND       1
 #define CONFIG_ENV_SIZE                        (512 << 10) /* Total Size Environment */
 #define CONFIG_ENV_ADDR                        ONENAND_ENV_OFFSET
+#endif
+
+#ifdef CONFIG_BOOT_NAND
+#define PISMO1_NAND_SIZE               GPMC_SIZE_128M /* Configure the PISMO */
+#define CONFIG_NAND_OMAP_GPMC
+#define CONFIG_SYS_NAND_BASE           NAND_BASE
+#define GPMC_NAND_ECC_LP_x16_LAYOUT    1
+#define CONFIG_ENV_OFFSET              0x260000 /* environment starts here */
+#define CONFIG_ENV_IS_IN_NAND          1
+#define CONFIG_ENV_SIZE                        (512 << 10) /* Total Size Environment */
+#define CONFIG_ENV_ADDR                        NAND_ENV_OFFSET
+#define CONFIG_SYS_MAX_NAND_DEVICE      1
+#endif
 
 /*
  * Size of malloc() pool