]> git.sur5r.net Git - openocd/commitdiff
Ben Bodley <ben@teknique.com> non-CFI compliant flash (AMIC A29L800A)
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 20 Jul 2008 17:08:18 +0000 (17:08 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 20 Jul 2008 17:08:18 +0000 (17:08 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@841 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/flash/cfi.c
src/flash/cfi.h
src/flash/non_cfi.c

index fea75a741ff4470440c375ae3d03b9ddffdccaa0..3c17980ee9bc56b6d6de4b2f477731ec78d1bb43 100644 (file)
@@ -94,6 +94,7 @@ cfi_fixup_t cfi_jedec_fixups[] = {
        {CFI_MFR_AMD, 0x2223, cfi_fixup_non_cfi, NULL},
        {CFI_MFR_AMD, 0x22ab, cfi_fixup_non_cfi, NULL},
        {CFI_MFR_FUJITSU, 0x226b, cfi_fixup_non_cfi, NULL},
+       {CFI_MFR_AMIC, 0xb31a, cfi_fixup_non_cfi, NULL},
        {0, 0, NULL, NULL}
 };
 
@@ -106,6 +107,7 @@ cfi_fixup_t cfi_0002_fixups[] = {
        {CFI_MFR_SST, 0x2780, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
        {CFI_MFR_ATMEL, 0x00C8, cfi_fixup_atmel_reversed_erase_regions, NULL},
        {CFI_MFR_FUJITSU, 0x226b, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]},
+       {CFI_MFR_AMIC, 0xb31a, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]},
        {CFI_MFR_ANY, CFI_ID_ANY, cfi_fixup_0002_erase_regions, NULL},
        {0, 0, NULL, NULL}
 };
index 155801c8c418d617bcdbff79a6ecafe367bc6493..ade63185e78563da6aa9c6d343f02911edf58c34 100644 (file)
@@ -151,6 +151,7 @@ typedef struct cfi_fixup_s
 #define CFI_MFR_FUJITSU                0x0004
 #define CFI_MFR_ATMEL  0x001F
 #define CFI_MFR_ST             0x0020  /* STMicroelectronics */
+#define CFI_MFR_AMIC           0x0037
 #define CFI_MFR_SST            0x00BF
 
 #define CFI_MFR_ANY            0xffff
index a98ed7a0c85472336ebf7c8d471139646708ece7..b9ae4c7d663acef8068874e5f40af19860545321 100644 (file)
@@ -186,6 +186,23 @@ non_cfi_t non_cfi_flashes[] = {
                        0x00000000
                }
        },
+       {
+               .mfr = CFI_MFR_AMIC,
+           .id = 0xb31a,               /* A29L800A */
+               .pri_id = 0x02,
+           .dev_size = 0x14,
+           .interface_desc = 0x2,
+           .max_buf_write_size = 0x0,
+           .num_erase_regions = 4,
+           .erase_region_info =
+               {
+                       0x00400000,             /* 1x 16KB */
+                       0x00200001,             /* 2x 8KB */
+                       0x00800000,             /* 1x 32KB */
+                       0x0100000e,             /* 15x 64KB */
+                       0x00000000
+           }
+       },
        {
                .mfr = 0,
                .id = 0,