drivers/mtd: Move conditional compilation to Makefile
[platform/kernel/u-boot.git] / include / configs / APC405.h
index 5b04888..6ee0a36 100644 (file)
@@ -36,7 +36,7 @@
  */
 #define CONFIG_405GP           1       /* This is a PPC405 CPU         */
 #define CONFIG_4xx             1       /* ...member of PPC4xx family   */
-#define CONFIG_APCG405         1       /* ...on a APC405 board         */
+#define CONFIG_APCG405         1       /* ...on a APC405 board         */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* call board_early_init_f()    */
 #define CONFIG_BOARD_EARLY_INIT_R 1
@@ -48,6 +48,7 @@
 
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_BOOTDELAY       1       /* autoboot after 3 seconds     */
+#define CONFIG_BOOTCOUNT_LIMIT 1
 
 #undef CONFIG_BOOTARGS
 
                                "run ramargs addip addcon usbargs;"     \
                                "bootm 200000 300000"
 #define CFG_USB_ARGS           "setenv bootargs $(bootargs) usbboot=1"
+#define CFG_BOOTLIMIT          "3"
+#define CFG_ALT_BOOTCOMMAND    "run usb_self;reset"
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
-        "hostname=abg405\0"                                             \
-        "bd_type=abg405\0"                                              \
+       "hostname=abg405\0"                                             \
+       "bd_type=abg405\0"                                              \
        "serial#=AA0000\0"                                              \
-        "kernel_addr=fe000000\0"                                        \
-        "ramdisk_addr=fe100000\0"                                       \
-        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
-        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
-                "nfsroot=$(serverip):$(rootpath)\0"                     \
-        "addip=setenv bootargs $(bootargs) "                            \
-                "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"      \
-                ":$(hostname)::off panic=1\0"                           \
-        "addcon=setenv bootargs $(bootargs) console=ttyS0,$(baudrate)"  \
-                " $(optargs)\0"                                         \
-        "flash_self=run ramargs addip addcon;"                          \
-                "bootm $(kernel_addr) $(ramdisk_addr)\0"                \
-        "net_nfs=tftp 200000 $(img);run nfsargs addip addcon;"          \
-                "bootm\0"                                               \
-        "rootpath=/tftpboot/abg405/target_root\0"                       \
-        "img=/tftpboot/abg405/pImage\0"                                 \
-        "load=tftp 100000 /tftpboot/abg405/u-boot.bin\0"               \
-        "update=protect off fff80000 ffffffff;era fff80000 ffffffff;"   \
-                "cp.b 100000 fff80000 80000\0"                          \
-        "ipaddr=10.0.111.111\0"                                         \
-        "netmask=255.255.0.0\0"                                         \
-        "serverip=10.0.0.190\0"                                                \
-        "splashimage=ffe80000\0"                                        \
+       "kernel_addr=fe000000\0"                                        \
+       "ramdisk_addr=fe100000\0"                                       \
+       "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
+       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+       "nfsroot=$(serverip):$(rootpath)\0"                             \
+       "addip=setenv bootargs $(bootargs) "                            \
+               "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"      \
+               ":$(hostname)::off panic=1\0"                           \
+       "addcon=setenv bootargs $(bootargs) console=ttyS0,$(baudrate)"  \
+               " $(optargs)\0"                                         \
+       "flash_self=run ramargs addip addcon;"                          \
+               "bootm $(kernel_addr) $(ramdisk_addr)\0"                \
+       "net_nfs=tftp 200000 $(img);run nfsargs addip addcon;"          \
+               "bootm\0"                                               \
+       "rootpath=/tftpboot/abg405/target_root\0"                       \
+       "img=/tftpboot/abg405/pImage\0"                                 \
+       "load=tftp 100000 /tftpboot/abg405/u-boot.bin\0"                \
+       "update=protect off fff80000 ffffffff;era fff80000 ffffffff;"   \
+               "cp.b 100000 fff80000 80000\0"                          \
+       "ipaddr=10.0.111.111\0"                                         \
+       "netmask=255.255.0.0\0"                                         \
+       "serverip=10.0.0.190\0"                                         \
+       "splashimage=ffe80000\0"                                        \
        "usb_load="CFG_USB_LOAD_COMMAND"\0"                             \
        "usb_self="CFG_USB_SELF_COMMAND"\0"                             \
        "usbargs="CFG_USB_ARGS"\0"                                      \
-        ""
-#define CONFIG_BOOTCOMMAND     "run flash_self;run usb_self"
+       "bootlimit="CFG_BOOTLIMIT"\0"                                   \
+       "altbootcmd="CFG_ALT_BOOTCOMMAND"\0"                            \
+       ""
+#define CONFIG_BOOTCOMMAND     "run flash_self;reset"
 
 #define CONFIG_ETHADDR         00:02:27:8e:00:00
 
 /* If a long serial cable is connected but */
 /* other end is dead, garbage will be read */
 #define CONFIG_AUTOBOOT_KEYED  1
-#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n"
+#define CONFIG_AUTOBOOT_PROMPT \
+       "Press SPACE to abort autoboot in %d seconds\n", bootdelay
 #undef CONFIG_AUTOBOOT_DELAY_STR
 #define CONFIG_AUTOBOOT_STOP_STR " "
 
@@ -263,7 +269,7 @@ extern int flash_banks;
 
 #define CFG_FLASH_BASE         0xFE000000
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 #define CFG_MAX_FLASH_BANKS    flash_banks /* max num of flash banks */
                                            /* updated in board_early_init_r */
@@ -414,7 +420,12 @@ extern int flash_banks;
 #define CFG_INIT_RAM_END       CFG_OCM_DATA_SIZE /* End of used area in RAM */
 #define CFG_GBL_DATA_SIZE      128 /* reserved bytes for initial data */
 #define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
-#define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
+/* reserve some memory for BOOT limit info */
+#define CFG_INIT_SP_OFFSET     (CFG_GBL_DATA_OFFSET - 16)
+
+#ifdef CONFIG_BOOTCOUNT_LIMIT /* reserve 2 word for bootcount limit */
+#define CFG_BOOTCOUNT_ADDR (CFG_GBL_DATA_OFFSET - 8)
+#endif
 
 /*
  * Internal Definitions