]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Add support for S29GL064M-R3 flash chip on xsengine board
authorWolfgang Denk <wd@pollux.denx.de>
Tue, 4 Oct 2005 22:03:55 +0000 (00:03 +0200)
committerWolfgang Denk <wd@pollux.denx.de>
Tue, 4 Oct 2005 22:03:55 +0000 (00:03 +0200)
Patch by Kurt Stremerch, 18 Apr 2005

CHANGELOG
board/xsengine/flash.c
include/flash.h

index 2b446015de87a807d288958f59a3e465dc85026e..3303bb732259cf43098826e93f8eca93afc4d551 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* Add support for S29GL064M-R3 flash chip on xsengine board
+  Patch by Kurt Stremerch, 18 Apr 2005
+
 * E500 update: repoint IVPR to RAM when code is relocated
   Patch by Kylo Ginsberg, 13 Apr 2005
 
index 3f93700d6db17bb2857b11b36bae2d5a885b9b11..2b9afc7a77bcfcac7063d2b7779291015a67b2ad 100644 (file)
@@ -101,13 +101,9 @@ void flash_print_info  (flash_info_t *info)
        }
 
        switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AMLV128U:    printf ("AM29LV128ML (128Mbit, uniform sector size)\n");
-                               break;
-       case FLASH_AMLV320U:    printf ("AM29LV320ML (32Mbit, uniform sector size)\n");
-                               break;
        case FLASH_AMLV640U:    printf ("AM29LV640ML (64Mbit, uniform sector size)\n");
                                break;
-       case FLASH_AMLV320B:    printf ("AM29LV320MB (32Mbit, bottom boot sect)\n");
+       case FLASH_S29GL064M:   printf ("S29GL064M (64Mbit, top boot sector size)\n");
                                break;
        default:                printf ("Unknown Chip Type\n");
                                break;
@@ -174,17 +170,6 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
                debug ("Mirror Bit flash: addr[14] = %08lX  addr[15] = %08lX\n",
                        addr[14], addr[15]);
                switch(addr[14]) {
-               case AMD_ID_LV128U_2:
-                       if (addr[15] != AMD_ID_LV128U_3) {
-                               debug ("Chip: AMLV128U -> unknown\n");
-                               info->flash_id = FLASH_UNKNOWN;
-                       } else {
-                               debug ("Chip: AMLV128U\n");
-                               info->flash_id += FLASH_AMLV128U;
-                               info->sector_count = 256;
-                               info->size = 0x02000000;
-                       }
-                       break;                          /* => 32 MB     */
                case AMD_ID_LV640U_2:
                        if (addr[15] != AMD_ID_LV640U_3) {
                                debug ("Chip: AMLV640U -> unknown\n");
@@ -196,17 +181,17 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
                                info->size = 0x01000000;
                        }
                        break;                          /* => 16 MB     */
-               case AMD_ID_LV320B_2:
-                       if (addr[15] != AMD_ID_LV320B_3) {
-                               debug ("Chip: AMLV320B -> unknown\n");
+               case AMD_ID_GL064MT_2:
+                       if (addr[15] != AMD_ID_GL064MT_3) {
+                               debug ("Chip: S29GL064M-R3 -> unknown\n");
                                info->flash_id = FLASH_UNKNOWN;
                        } else {
-                               debug ("Chip: AMLV320B\n");
-                               info->flash_id += FLASH_AMLV320B;
-                               info->sector_count = 71;
-                               info->size = 0x00800000;
+                               debug ("Chip: S29GL064M-R3\n");
+                               info->flash_id += FLASH_S29GL064M;
+                               info->sector_count = 128;
+                               info->size = 0x01000000;
                        }
-                       break;                          /* =>  8 MB     */
+                       break;                          /* => 16 MB     */
                default:
                        debug ("Chip: *** unknown ***\n");
                        info->flash_id = FLASH_UNKNOWN;
index beab260dc4f26ff2dd35f850c41a87a521bd8509..6381cfcc7e98c654d24136edb382bf1878eab0c2 100644 (file)
@@ -206,6 +206,8 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
 #define AMD_ID_LV256U_3 0x22012201     /* 3rd ID word for AM29LV256M  at 0x3c */
 #define AMD_ID_GL064M_2 0x22132213     /* 2nd ID word for S29GL064M-R6 */
 #define AMD_ID_GL064M_3 0x22012201     /* 3rd ID word for S29GL064M-R6 */
+#define AMD_ID_GL064MT_2 0x22102210    /* 2nd ID word for S29GL064M-R3 (top boot sector) */
+#define AMD_ID_GL064MT_3 0x22012201    /* 3rd ID word for S29GL064M-R3 (top boot sector) */
 
 #define AMD_ID_LV320B_2 0x221A221A     /* 2d ID word for AM29LV320MB at 0x38 */
 #define AMD_ID_LV320B_3 0x22002200     /* 3d ID word for AM29LV320MB at 0x3c */