changeset 606:de936aea260a

FFS: added Multi-ID support for Samsung flash chips needed for GTM900 target support
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jun 2019 19:23:57 +0000
parents 07d0dc4431f4
children 030ce1ddd4f7
files src/cs/drivers/drv_app/ffs/board/dev.c src/cs/drivers/drv_app/ffs/board/drv.c
diffstat 2 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/ffs/board/dev.c	Mon Jun 17 18:40:32 2019 +0000
+++ b/src/cs/drivers/drv_app/ffs/board/dev.c	Mon Jun 17 19:23:57 2019 +0000
@@ -624,18 +624,22 @@
     // Samsung K5A3340YB Bottom boot, 14Mb + 18Mb (!?)
     { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x223D,
       FFS_DRIVER_AMD_SB,  8 },
-//zack add
-   //Samsung K5A3240CG
-   { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22A0,
+
+    /* post-TI additions */
+
+    // Samsung K5A32xxCTM (Openmoko)
+    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22A0,
       FFS_DRIVER_AMD_SB,  7 }, 
-   //Samsung K5L6331CAA-D270
-    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x257E,
+
+    // Samsung K5L33xxCAM (Huawei GTM900)
+    // Multi-id device: 0x257E, 0x2503, 0x2501. Converted to 0x0301
+    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x0301,
+      FFS_DRIVER_AMD_SB,  7 }, 
+
+    // Samsung K5L6331CAA-D270 ?? (stanza came with moko10/11 source)
+    // Multi-id device: 0x257E, 0x2506, 0x2501. Converted to 0x0601
+    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x0601,
       FFS_DRIVER_AMD_SB,  15 },
-    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x2506,
-      FFS_DRIVER_AMD_SB,  15 },  
-    { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x2501,
-      FFS_DRIVER_AMD_SB,  15 },  
-//end zack
 
     /********** SST Devices ***********************************************/
 
--- a/src/cs/drivers/drv_app/ffs/board/drv.c	Mon Jun 17 18:40:32 2019 +0000
+++ b/src/cs/drivers/drv_app/ffs/board/drv.c	Mon Jun 17 19:23:57 2019 +0000
@@ -1375,6 +1375,10 @@
               dev.device += ffsdrv_is_new_spansion_flash();
           #endif
         }
+        else if (dev.manufact == MANUFACT_SAMSUNG && device_id[0] == 0x257E) {
+            /* Samsung's version of extended ID */
+            dev.device = (device_id[1] << 8) | (device_id[2] & 0xFF);
+        }
         else 
             dev.device = device_id[0];
 #endif