summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-12-14 18:06:19 +0000
committermifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-12-14 18:06:19 +0000
commit900c70f8e8e746bd402cd9a65e378451be627edc (patch)
tree56e4bd5185a12b8180a96393162342592da8f0e9
parent9c999216b1601d762d4928b201bc7a9d8778f2aa (diff)
downloadopenocd_libswd-900c70f8e8e746bd402cd9a65e378451be627edc.tar.gz
openocd_libswd-900c70f8e8e746bd402cd9a65e378451be627edc.tar.bz2
openocd_libswd-900c70f8e8e746bd402cd9a65e378451be627edc.tar.xz
openocd_libswd-900c70f8e8e746bd402cd9a65e378451be627edc.zip
- added patch from Dominic to unlock the ATMEL flash in cfi_read_atmel_pri_ext
- set cfi_info->write_algorithm and cfi_info->erase_check_algorithm to NULL to get "flash erase_check" command working git-svn-id: svn://svn.berlios.de/openocd/trunk@227 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/flash/cfi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c
index ee99408e..28dd4d0e 100644
--- a/src/flash/cfi.c
+++ b/src/flash/cfi.c
@@ -498,6 +498,9 @@ int cfi_read_atmel_pri_ext(flash_bank_t *bank)
pri_ext->TopBottom = 2;
else
pri_ext->TopBottom = 3;
+
+ pri_ext->_unlock1 = cfi_unlock_addresses[CFI_UNLOCK_555_2AA].unlock1;
+ pri_ext->_unlock2 = cfi_unlock_addresses[CFI_UNLOCK_555_2AA].unlock2;
return ERROR_OK;
}
@@ -611,7 +614,10 @@ int cfi_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **
}
cfi_info = malloc(sizeof(cfi_flash_bank_t));
- bank->driver_priv = cfi_info;
+ bank->driver_priv = cfi_info;
+
+ cfi_info->write_algorithm = NULL;
+ cfi_info->erase_check_algorithm = NULL;
cfi_info->x16_as_x8 = 0;
cfi_info->jedec_probe = 0;