]> git.sur5r.net Git - u-boot/commitdiff
TQM8260: environment in flash instead EEPROM, baudrate 115k
authorWolfgang Denk <wd@xpert.denx.de>
Sun, 19 Oct 2008 19:54:30 +0000 (21:54 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 21 Oct 2008 09:27:53 +0000 (11:27 +0200)
Several customers have reported problems with the environment in
EEPROM, including corrupted content after board reset. Probably the
code to prevent I2C Enge Conditions is not working sufficiently.

We move the environment to flash now, which allows to have a backup
copy plus gives much faster boot times.

Also, change the default console initialization to 115200 bps as used
on most other boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
board/tqc/tqm8260/flash.c
include/configs/TQM8260.h

index 4a6d5382bed73c236fa19fe8f9b65c1855e8e5a6..cabc818ee9ffc2cceba89a6fb29eb59170771f9c 100644 (file)
@@ -204,7 +204,8 @@ unsigned long flash_init (void)
 #if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH0_BASE
        flash_protect (FLAG_PROTECT_SET,
                       CONFIG_SYS_MONITOR_BASE,
-                      CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
+                      CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
+                      &flash_info[0]);
 #endif
 
 #if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR)
@@ -213,7 +214,15 @@ unsigned long flash_init (void)
 # endif
        flash_protect (FLAG_PROTECT_SET,
                       CONFIG_ENV_ADDR,
-                      CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+                      CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+                      &flash_info[0]);
+#endif
+
+#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR_REDUND)
+       flash_protect (FLAG_PROTECT_SET,
+                      CONFIG_ENV_ADDR_REDUND,
+                      CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+                      &flash_info[0]);
 #endif
 
        return (size_b0);
index 54f4b3106abdf20058e58854b49eb0eefcdb2423..533c7adb3d5fc76e6dda3d64f40e75d4e48b5556 100644 (file)
 
 #define        CONFIG_BOOTCOUNT_LIMIT
 
-#if defined(CONFIG_CONS_NONE) || defined(CONFIG_CONS_USE_EXTC)
-#define CONFIG_BAUDRATE                230400
-#else
-#define CONFIG_BAUDRATE                9600
-#endif
+#define CONFIG_BAUDRATE                115200
 
 #define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
 
        "flash_self=run ramargs addip;"                                 \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
        "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
-       "rootpath=/opt/eldk/ppc_82xx\0"                                 \
-       "bootfile=/tftpboot/TQM8260/uImage\0"                           \
-       "kernel_addr=40040000\0"                                        \
-       "ramdisk_addr=40100000\0"                                       \
+       "rootpath=/opt/eldk/ppc_6xx\0"                                  \
+       "bootfile=tqm8260/uImage\0"                             \
+       "kernel_addr=40080000\0"                                        \
+       "ramdisk_addr=40200000\0"                                       \
        ""
 #define CONFIG_BOOTCOMMAND     "run flash_self"
 
 #define CONFIG_SYS_FLASH_ERASE_TOUT    240000  /* Flash Erase Timeout (in ms)  */
 #define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (in ms)  */
 
-#if 0
-/* Start port with environment in flash; switch to EEPROM later */
 #define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE+0x40000)
-#define CONFIG_ENV_SIZE                0x40000
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE + 0x40000)
+#define CONFIG_ENV_SIZE                0x08000
 #define CONFIG_ENV_SECT_SIZE   0x40000
-#else
-/* Final version: environment in EEPROM */
-#define CONFIG_ENV_IS_IN_EEPROM        1
-#define CONFIG_ENV_OFFSET              0
-#define CONFIG_ENV_SIZE                2048
-#endif
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
 
 /*-----------------------------------------------------------------------
  * Hardware Information Block
 #define CONFIG_SYS_FLASH_BASE          CONFIG_SYS_FLASH0_BASE
 #define CONFIG_SYS_MONITOR_BASE        TEXT_BASE
 #define CONFIG_SYS_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor */
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()*/
+#define CONFIG_SYS_MALLOC_LEN          (512 << 10)     /* Reserve 512 kB for malloc()*/
 
 /*
  * Internal Definitions