]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
TQM8xx: use the CFI flash driver on all TQM8xx boards
authorMartin Krause <martin.krause@tqs.de>
Thu, 27 Sep 2007 09:10:08 +0000 (11:10 +0200)
committerWolfgang Denk <wd@denx.de>
Thu, 27 Dec 2007 01:00:10 +0000 (02:00 +0100)
Signed-off-by: Martin Krause <martin.krause@tqs.de>
15 files changed:
board/tqm8xx/flash.c
include/configs/HMI10.h
include/configs/TQM823L.h
include/configs/TQM823M.h
include/configs/TQM850L.h
include/configs/TQM850M.h
include/configs/TQM855L.h
include/configs/TQM855M.h
include/configs/TQM860L.h
include/configs/TQM860M.h
include/configs/TQM862L.h
include/configs/TQM862M.h
include/configs/TQM866M.h
include/configs/TQM885D.h
include/configs/virtlab2.h

index db0a7e5eb86bc345e76c0ca3c201fe515d248fc1..4342ebc8419321af0f821bb69d0c40aa932b91ec 100644 (file)
@@ -33,6 +33,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if !defined(CFG_FLASH_CFI_DRIVER) /* do not use if CFI driver is configured */
+
 #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
     && !defined(CONFIG_TQM885D)
 # ifndef CFG_OR_TIMING_FLASH_AT_50MHZ
@@ -828,3 +830,5 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
 
 /*-----------------------------------------------------------------------
  */
+
+#endif /* !defined(CFG_FLASH_CFI_DRIVER) */
index 02ae5d005dffc5e33a6883f5ce5bebc7d4a87bb0..f8b026212dfa86c7abfbb7191c3de63b7cb1c5a0 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_OFFSET         0x8000  /*   Offset   of Environment Sector     */
index 7a3801026fbd5d2ed17c1515ab6b7992e021b964..be5b4d3f581cabfa6e42f3b3fe5551588824424e 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */
index e8b6a80b19e44b716b5904487926839cd89f2946..a0c01b65a1522550dad5663dd4a998ff43a83fc7 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
-#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment Sector     */
+#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment            */
 #define        CFG_ENV_SECT_SIZE       0x20000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
index beeca6343e823983e24f44e2a1a827aa2d4fa1d3..f51b12e30332bda2a85e46246b10eec662e90093 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */
index d5609c1d485d3323736a3c556ac55a83117962ed..a725e71ca2c4a1d6bf8c73a40fb6669b2c59e4c5 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
-#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment Sector     */
+#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment            */
 #define        CFG_ENV_SECT_SIZE       0x20000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
index e35b5b2ac1edf88464997431095a0dd2f371ca8f..16dc3ebe925c62202cec795c687e85a3addd3dbf 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */
index cd5212eff8eaa77ab465e8dcf4962eee8c889deb..c4b459952a4869d2ab90ac088a8c32adf2de860b 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
-#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment Sector     */
+#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment            */
 #define        CFG_ENV_SECT_SIZE       0x20000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
index d5838dbf372a0772d52c599f9bf60a26137797c9..ac22c1e8b4f898236b328fa01287b94be8768d52 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */
index 44ad53e6f42b1b9f18926da7b55f5e8edd46e4b5..8601de17225768b094578c6f7f49c75180e57935 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
-
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
index f09d3d1654f6921ef15012ea3f142473521fa9a5..2bf4a2a357ab31b643668e079d27c74f8c4d965d 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
-
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */
 #define        CFG_ENV_SIZE            0x4000  /* Total Size of Environment Sector     */
 
index 039aa3af428f04c00e29b5fbcaa5dce2da548a69..d42ffc9da2658615e172a369db8e6d93f2bbf53f 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
-
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
-#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment Sector     */
+#define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment            */
 #define        CFG_ENV_SECT_SIZE       0x20000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
index ca3c166524fcc3ed50458b3df15ed0aacb12f6b1..d7e5eebae729574eef37860e9beb73b6b65cae50 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
-
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_OFFSET         0x40000 /*   Offset   of Environment Sector     */
index 5bbb8e760275f73759a66bef18054b0b0b0b2500..8a3aa4bc4be91b2810ebee3a7f3c7f967db6a30e 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
 
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_OFFSET         0x40000 /*   Offset   of Environment Sector     */
index edae6f4b984e8c4929f0a10ac61fe75c975ecec1..827a28f07714087277a196441922d2277a846c0a 100644 (file)
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks           */
-#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip    */
 
-#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms)      */
-#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms)      */
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }
+#define CFG_FLASH_EMPTY_INFO
+#define CFG_FLASH_USE_BUFFER_WRITE     1
+#define CFG_MAX_FLASH_BANKS    2       /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT     71      /* max number of sectors on one chip */
 
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x8000  /*   Offset   of Environment Sector     */