projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flash/nor/efr32: fixed lockbits and user data
[fw/openocd]
/
src
/
flash
/
nor
/
stellaris.c
diff --git
a/src/flash/nor/stellaris.c
b/src/flash/nor/stellaris.c
index 569c09b46915026c6112e2068d0a2b6c70ab1c2d..6135c957452bbaea22efde3abc961145f95c0365 100644
(file)
--- a/
src/flash/nor/stellaris.c
+++ b/
src/flash/nor/stellaris.c
@@
-30,6
+30,7
@@
#include "jtag/interface.h"
#include "imp.h"
#include <target/algorithm.h>
#include "jtag/interface.h"
#include "imp.h"
#include <target/algorithm.h>
+#include <target/arm_adi_v5.h>
#include <target/armv7m.h>
#define DID0_VER(did0) ((did0 >> 28)&0x07)
#include <target/armv7m.h>
#define DID0_VER(did0) ((did0 >> 28)&0x07)
@@
-886,8
+887,6
@@
static int stellaris_erase(struct flash_bank *bank, unsigned int first,
target_write_u32(target, FLASH_CRIS, 0);
return ERROR_FLASH_OPERATION_FAILED;
}
target_write_u32(target, FLASH_CRIS, 0);
return ERROR_FLASH_OPERATION_FAILED;
}
-
- bank->sectors[banknr].is_erased = 1;
}
return ERROR_OK;
}
return ERROR_OK;
@@
-1318,13
+1317,9
@@
COMMAND_HANDLER(stellaris_handle_mass_erase_command)
if (retval != ERROR_OK)
return retval;
if (retval != ERROR_OK)
return retval;
- if (stellaris_mass_erase(bank) == ERROR_OK) {
- /* set all sectors as erased */
- for (unsigned int i = 0; i < bank->num_sectors; i++)
- bank->sectors[i].is_erased = 1;
-
+ if (stellaris_mass_erase(bank) == ERROR_OK)
command_print(CMD, "stellaris mass erase complete");
command_print(CMD, "stellaris mass erase complete");
-
}
else
+ else
command_print(CMD, "stellaris mass erase failed");
return ERROR_OK;
command_print(CMD, "stellaris mass erase failed");
return ERROR_OK;