Browse Source

cortex_a: fix cortex_a_assert_reset() if srst_gates_jtag

The cortex_a specific assert_reset function must only apply nSRST if
the reset configuration states that JTAG can be used while nSRST is
asserted.

Change-Id: If604a65fdea5bcb46ec723ada547a4e8d6fa8c59
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/3356
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
tags/v0.10.0-rc1
Matthias Welwarsky 8 years ago
committed by Freddie Chopin
parent
commit
b0698501b0
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/target/cortex_a.c

+ 3
- 1
src/target/cortex_a.c View File

@@ -1912,7 +1912,9 @@ static int cortex_a_assert_reset(struct target *target)
/* REVISIT handle "pulls" cases, if there's
* hardware that needs them to work.
*/
jtag_add_reset(0, 1);
if (target->reset_halt)
if (jtag_get_reset_config() & RESET_SRST_NO_GATING)
jtag_add_reset(0, 1);
} else {
LOG_ERROR("%s: how to reset?", target_name(target));
return ERROR_FAIL;


Loading…
Cancel
Save