diff options
author | Wookey <wookey@wookware.org> | 2010-08-31 13:53:50 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-09-03 22:08:30 +0200 |
commit | ae80c3564a5693a5326ceac750ec6779efe3f523 (patch) | |
tree | 6cd111c98ce17cf2a3fcfc0347b9484215332ae6 | |
parent | 3c69eee9ef481333eb08e72badc9404e607f861c (diff) | |
download | openocd+libswd-ae80c3564a5693a5326ceac750ec6779efe3f523.tar.gz openocd+libswd-ae80c3564a5693a5326ceac750ec6779efe3f523.tar.bz2 openocd+libswd-ae80c3564a5693a5326ceac750ec6779efe3f523.tar.xz openocd+libswd-ae80c3564a5693a5326ceac750ec6779efe3f523.zip |
Numonyx M29W160ET patch
Someone called David Carne popped up on IRC and offered a fix (as he's not
on this list so can;t post here). I am just passing it on. (thanx David)
10:54 < davidc__> Basically; the Numonyx M29W160ET has an incorrect CFI PRI
block; it describes the erase blocks backwards
10:54 < davidc__> the linked patch has a fixup for that part [really trivial]:
-rw-r--r-- | src/flash/nor/cfi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 96aca48a..9813d83b 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -48,7 +48,7 @@ static struct cfi_unlock_addresses cfi_unlock_addresses[] = /* CFI fixups foward declarations */ static void cfi_fixup_0002_erase_regions(struct flash_bank *flash, void *param); static void cfi_fixup_0002_unlock_addresses(struct flash_bank *flash, void *param); -static void cfi_fixup_atmel_reversed_erase_regions(struct flash_bank *flash, void *param); +static void cfi_fixup_reversed_erase_regions(struct flash_bank *flash, void *param); /* fixup after reading cmdset 0002 primary query table */ static const struct cfi_fixup cfi_0002_fixups[] = { @@ -57,7 +57,8 @@ static const struct cfi_fixup cfi_0002_fixups[] = { {CFI_MFR_SST, 0x00D6, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_5555_2AAA]}, {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_ATMEL, 0x00C8, cfi_fixup_reversed_erase_regions, NULL}, + {CFI_MFR_ST, 0x22C4, cfi_fixup_reversed_erase_regions, NULL}, /* M29W160ET */ {CFI_MFR_FUJITSU, 0x22ea, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]}, {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]}, @@ -2214,7 +2215,7 @@ static int cfi_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, return cfi_reset(bank); } -static void cfi_fixup_atmel_reversed_erase_regions(struct flash_bank *bank, void *param) +static void cfi_fixup_reversed_erase_regions(struct flash_bank *bank, void *param) { (void) param; struct cfi_flash_bank *cfi_info = bank->driver_priv; |