Merge branch 'master' of git://git.denx.de/u-boot-usb
[platform/kernel/u-boot.git] / include / configs / omap3_beagle.h
index d3a0122..657780e 100644 (file)
 /* commands to include */
 #include <config_cmd_default.h>
 
+#define CONFIG_CMD_ASKENV
+
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_EXT2                /* EXT2 Support                 */
 #define CONFIG_CMD_FAT         /* FAT support                  */
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_SETEXPR     /* Evaluate expressions         */
+#define CONFIG_CMD_GPIO     /* Enable gpio command */
 
 #undef CONFIG_CMD_FLASH                /* flinfo, erase, protect       */
 #undef CONFIG_CMD_FPGA         /* FPGA configuration Support   */
                                                        /* partition */
 
 /* Environment information */
-#define CONFIG_BOOTDELAY               2
+#define CONFIG_BOOTDELAY               3
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "loadaddr=0x80200000\0" \
        "ramboot=echo Booting from ramdisk ...; " \
                "run ramargs; " \
                "bootm ${loadaddr}\0" \
-
+       "userbutton=if gpio input 173; then run userbutton_xm; " \
+               "else run userbutton_nonxm; fi;\0" \
+       "userbutton_xm=gpio input 4;\0" \
+       "userbutton_nonxm=gpio input 7;\0"
+/* "run userbutton" will return 1 (false) if is pressed and 0 (false) if not */
 #define CONFIG_BOOTCOMMAND \
        "if mmc rescan ${mmcdev}; then " \
-               "if userbutton; then " \
+               "if run userbutton; then " \
+                       "setenv bootenv uEnv.txt;" \
+               "else " \
                        "setenv bootenv user.txt;" \
                "fi;" \
                "echo SD/MMC found on device ${mmcdev};" \
  */
 #define CONFIG_SYS_LONGHELP            /* undef to save memory */
 #define CONFIG_SYS_HUSH_PARSER         /* use "hush" command parser */
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 #define CONFIG_SYS_PROMPT              "OMAP3 beagleboard.org # "
 #define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE           0x40200800
-#define CONFIG_SPL_MAX_SIZE            (45 * 1024)
+#define CONFIG_SPL_MAX_SIZE            (54 * 1024)     /* 8 KB for stack */
 #define CONFIG_SPL_STACK               LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR      0x80000000
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION   1
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME       "u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT