diff options
author | Matthias Welwarsky <matthias.welwarsky@sysgo.com> | 2016-02-09 14:49:20 +0100 |
---|---|---|
committer | Freddie Chopin <freddie.chopin@gmail.com> | 2016-05-08 09:22:09 +0100 |
commit | b0698501b0e789091e9f9f1427b32af304888769 (patch) | |
tree | ef7e37b803c72e174c4c8a5948c54a0260f71c88 /src | |
parent | 271e8f26f2d6cd1a9660d7a9c984021d7075dcd1 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/cortex_a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 4c0d163f..f9ffccd0 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -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; |