]> git.sur5r.net Git - openocd/commitdiff
cfi: add EN29LV800BB support
authorGunnar Henne <g.henne@combio.de>
Thu, 18 Aug 2011 08:52:16 +0000 (09:52 +0100)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Thu, 18 Aug 2011 08:55:44 +0000 (09:55 +0100)
Posted by telekatz@gmx.de in the bettyhacks forum for openocd
0.4.0 and integrated into 0.5.0 by Gunnar Henne.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/flash/nor/cfi.c
src/flash/nor/cfi.h
src/flash/nor/non_cfi.c

index f854dd632b459595134f7a024ac645b3bdfc130c..90fdedecbcf9d605fe2c45c2c763fd2d7946eeff 100644 (file)
@@ -72,6 +72,7 @@ static const struct cfi_fixup cfi_0002_fixups[] = {
        {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_MX, 0x225b, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]},
+       {CFI_MFR_EON, 0x225b, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]},
        {CFI_MFR_AMD, 0x225b, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]},
        {CFI_MFR_ANY, CFI_ID_ANY, cfi_fixup_0002_erase_regions, NULL},
        {CFI_MFR_ST, 0x227E, cfi_fixup_0002_write_buffer, NULL}, /* M29W128G */
index 34807ee2f49c5dc83b6d3e4dd26f05c4ec6d159c..a57b0ddc49be9c3481ebdca08b87ea281dafecdc 100644 (file)
@@ -161,6 +161,7 @@ struct cfi_fixup
 #define CFI_MFR_AMIC   0x0037
 #define CFI_MFR_SST            0x00BF
 #define CFI_MFR_MX             0x00C2
+#define CFI_MFR_EON            0x007F
 
 #define CFI_MFR_ANY            0xffff
 #define CFI_ID_ANY             0xffff
index 9c516c257bfacbe90d4d1b4bb00be7d864de2a25..b944b72c234118a7eed2719ba72b21d445c58a99 100644 (file)
@@ -411,6 +411,23 @@ static struct non_cfi non_cfi_flashes[] = {
                        ERASE_REGION(1, 16*KB)
                }
        },
+       {
+               .mfr = CFI_MFR_EON,
+               .id = 0x225b,                           /* EN29LV800BB */
+               .pri_id = 0x02,
+               .dev_size = 1*MB,
+               .interface_desc = 0x2,          /* x8 or x16 device with nBYTE */
+               .max_buf_write_size = 0x0,
+               .status_poll_mask = CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7,
+               .num_erase_regions = 4,
+               .erase_region_info =
+               {
+                       ERASE_REGION(1, 16*KB),
+                       ERASE_REGION(2,  8*KB),
+                       ERASE_REGION(1, 32*KB),
+                       ERASE_REGION(15, 64*KB)
+               }
+       },
        {
                .mfr = CFI_MFR_ATMEL,
                .id = 0x00c0,                           /* Atmel 49BV1614 */