summaryrefslogtreecommitdiff
path: root/src/target/arm11.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-11 15:24:08 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-11 15:24:08 -0800
commitcfd79e96a6436cea427245a2c2f18fd52001898b (patch)
tree92db365b1bea92000caf4d69448d263bc7f2ee95 /src/target/arm11.c
parent08589462adf3f81b480faacecb8352428212a2f5 (diff)
downloadopenocd+libswd-cfd79e96a6436cea427245a2c2f18fd52001898b.tar.gz
openocd+libswd-cfd79e96a6436cea427245a2c2f18fd52001898b.tar.bz2
openocd+libswd-cfd79e96a6436cea427245a2c2f18fd52001898b.tar.xz
openocd+libswd-cfd79e96a6436cea427245a2c2f18fd52001898b.zip
ARM11: minor cleanup, mostly ITR comments
ITR register handling seemed to be giving me problems, so I updated the comments to better say what the code is trying to do ... and to note the preconditions (one of which seems to be an issue) as listed in the ARM1136 TRM. Also removed the unused "ARM11_TAP_DEFAULT" from the ITR scan code; all the callers already specify an exit path, since this register isn't usable with such vague semantics. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/arm11.c')
-rw-r--r--src/target/arm11.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 7b29f53e..7c747c06 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -1012,27 +1012,25 @@ static int arm11_write_memory_inner(struct target *target,
}
case 4: {
+ /* increment: STC p14,c5,[R0],#4 */
+ /* no increment: STC p14,c5,[R0]*/
uint32_t instr = !no_increment ? 0xeca05e01 : 0xed805e00;
/** \todo TODO: buffer cast to uint32_t* causes alignment warnings */
uint32_t *words = (uint32_t*)buffer;
+ /* "burst" here just means trusting each instruction executes
+ * fully before we run the next one: per-word roundtrips, to
+ * check the Ready flag, are not used.
+ */
if (!burst)
- {
- /* STC p14,c5,[R0],#4 */
- /* STC p14,c5,[R0]*/
- retval = arm11_run_instr_data_to_core(arm11, instr, words, count);
- if (retval != ERROR_OK)
- return retval;
- }
+ retval = arm11_run_instr_data_to_core(arm11,
+ instr, words, count);
else
- {
- /* STC p14,c5,[R0],#4 */
- /* STC p14,c5,[R0]*/
- retval = arm11_run_instr_data_to_core_noack(arm11, instr, words, count);
- if (retval != ERROR_OK)
- return retval;
- }
+ retval = arm11_run_instr_data_to_core_noack(arm11,
+ instr, words, count);
+ if (retval != ERROR_OK)
+ return retval;
break;
}
@@ -1309,7 +1307,7 @@ static const struct command_registration arm11_mw_command_handlers[] = {
.name = "burst",
.handler = &arm11_handle_bool_memwrite_burst,
.mode = COMMAND_ANY,
- .help = "Enable/Disable non-standard but fast burst mode"
+ .help = "Enable/Disable potentially risky fast burst mode"
" (default: enabled)",
},
{