Updates for TQM5200 modules:
authorWolfgang Denk <wd@atlas.denx.de>
Thu, 23 Nov 2006 21:58:58 +0000 (22:58 +0100)
committerWolfgang Denk <wd@atlas.denx.de>
Thu, 23 Nov 2006 21:58:58 +0000 (22:58 +0100)
- fix off-by-one error in board/tqm5200/cam5200_flash.c error message
- simplify "udate" definitions

board/tqm5200/cam5200_flash.c
board/tqm5200/tqm5200.c
include/configs/TQM5200.h

index 1a40633e5694bb5c3e1415c11f49cf160c6b77fb..8c3f62e398cef2d15e939498cc3da910e3aa01f4 100644 (file)
@@ -759,7 +759,7 @@ unsigned long flash_init(void)
 
                if (flash_info[i].flash_id == FLASH_UNKNOWN) {
                        printf("## Unknown FLASH on Bank %d - Size = 0x%08lx = %ld MB\n",
-                                       i, size_b[i], size_b[i] << 20);
+                                       i+1, size_b[i], size_b[i] << 20);
                        flash_info[i].sector_count = -1;
                        flash_info[i].size = 0;
                }
index cb57a5e269417b459eb14779cc3eb7540463f305..a4322b6661a02e6b91c0505b6f70c94590017247 100644 (file)
@@ -289,7 +289,7 @@ int checkboard (void)
 #elif defined(CONFIG_TB5200)
 # define CARRIER_NAME  "TB5200"
 #elif defined(CONFIG_CAM5200)
-# define CARRIER_NAME  "Cam5200"
+# define CARRIER_NAME  "CAM5200"
 #elif defined(CONFIG_FO300)
 # define CARRIER_NAME  "FO300"
 #else
index 4bae103e09cfbe0330103076ce1e293ccca6166c..08674ca49f5caa3ed9d43c711fca1d56d1b46297 100644 (file)
 
 #undef CONFIG_BOOTARGS
 
-#ifdef CONFIG_STK52XX
-# if defined(CONFIG_TQM5200_B)
-#  if defined(CFG_LOWBOOT)
-#   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC07FFFF;"                         \
-               "erase FC000000 FC07FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC07FFFF\0"
-#  else        /* highboot */
-#   define ENV_UPDT                                                    \
-       "update=protect off FFF00000 FFF7FFFF;"                         \
-               "erase FFF00000 FFF7FFFF;"                              \
+#if defined(CONFIG_TQM5200_B) && !defined(CFG_LOWBOOT)
+# define ENV_UPDT                                                      \
+       "update=protect off FFF00000 +${filesize};"                     \
+               "erase FFF00000 +${filesize};"                          \
                "cp.b 200000 FFF00000 ${filesize};"                     \
-               "protect on FFF00000 FFF7FFFF\0"
-#  endif /* CFG_LOWBOOT */
-# else /* !CONFIG_TQM5200_B */
-#  define ENV_UPDT                                                     \
-       "update=protect off FC000000 FC05FFFF;"                         \
-               "erase FC000000 FC05FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC05FFFF\0"
-# endif /* CONFIG_TQM5200_B */
-#elif defined (CONFIG_CAM5200)
-#   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC03FFFF;"                         \
-               "erase FC000000 FC03FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC03FFFF\0"
-#elif defined (CONFIG_FO300)
+               "protect on FFF00000 +${filesize}\0"
+#else  /* default lowboot configuration */
 #   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC05FFFF;"                         \
-               "erase FC000000 FC05FFFF;"                              \
+       "update=protect off FC000000 +${filesize};"                     \
+               "erase FC000000 +${filesize};"                          \
                "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC05FFFF\0"
-#else
-# error "Unknown Carrier Board"
-#endif /* CONFIG_STK52XX */
+               "protect on FC000000 +${filesize}\0"
+#endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "netdev=eth0\0"                                                 \
  */
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_SIZE           0x4000  /* 16 k - keep small for fast booting */
-#if defined(CONFIG_TQM5200_B)
+#if defined(CONFIG_TQM5200_B) || defined (CONFIG_CAM5200)
 #define CFG_ENV_SECT_SIZE      0x40000
 #else
 #define CFG_ENV_SECT_SIZE      0x20000