From 30dc76644da0dd9203dc9969a9be1d520fc5feb0 Mon Sep 17 00:00:00 2001 From: oharboe Date: Wed, 23 Apr 2008 05:27:45 +0000 Subject: [PATCH] Andre Renaud support for the am29sl800db CFI flash chip (id: 0x0004, 0x226b). git-svn-id: svn://svn.berlios.de/openocd/trunk@603 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/cfi.c | 2 ++ src/flash/cfi.h | 1 + src/flash/non_cfi.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/src/flash/cfi.c b/src/flash/cfi.c index 9c1910e5b..a4b95f08b 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -93,6 +93,7 @@ cfi_fixup_t cfi_jedec_fixups[] = { {CFI_MFR_ST, 0x00D6, cfi_fixup_non_cfi, NULL}, {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}, {0, 0, NULL, NULL} }; @@ -104,6 +105,7 @@ cfi_fixup_t cfi_0002_fixups[] = { {CFI_MFR_SST, 0x00D7, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]}, {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_ANY, CFI_ID_ANY, cfi_fixup_0002_erase_regions, NULL}, {0, 0, NULL, NULL} }; diff --git a/src/flash/cfi.h b/src/flash/cfi.h index 803678d43..155801c8c 100644 --- a/src/flash/cfi.h +++ b/src/flash/cfi.h @@ -148,6 +148,7 @@ typedef struct cfi_fixup_s } cfi_fixup_t; #define CFI_MFR_AMD 0x0001 +#define CFI_MFR_FUJITSU 0x0004 #define CFI_MFR_ATMEL 0x001F #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ #define CFI_MFR_SST 0x00BF diff --git a/src/flash/non_cfi.c b/src/flash/non_cfi.c index 74334126a..a98ed7a0c 100644 --- a/src/flash/non_cfi.c +++ b/src/flash/non_cfi.c @@ -169,6 +169,23 @@ non_cfi_t non_cfi_flashes[] = { 0x00000000 } }, + { + .mfr = CFI_MFR_FUJITSU, + .id = 0x226b, /* AM29SL800DB */ + .pri_id = 0x02, + .dev_size = 0x14, /* 2^20 = 1MB */ + .interface_desc = 0x2, /* x8 or x16 device with nBYTE */ + .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,