diff options
author | rodrigo_l_rosa <rodrigorosa.lg@gmail.com> | 2011-09-02 21:15:54 -0700 |
---|---|---|
committer | Øyvind Harboe <oyvindharboe@gmail.com> | 2011-11-24 23:22:34 +0000 |
commit | e6c3ab9df3293deb7e1d5484ad0d6fbf3e1cf3c8 (patch) | |
tree | e94cf3ceb50a0819dcd55bbff728106a59713626 /src/target/dsp5680xx.c | |
parent | b9346fbd644253afe81e786b6649f000c4003214 (diff) | |
download | riscv-openocd-e6c3ab9df3293deb7e1d5484ad0d6fbf3e1cf3c8.zip riscv-openocd-e6c3ab9df3293deb7e1d5484ad0d6fbf3e1cf3c8.tar.gz riscv-openocd-e6c3ab9df3293deb7e1d5484ad0d6fbf3e1cf3c8.tar.bz2 |
dsp5680xx - relocating code
moved reset_jtag to the top, since it will be needed in future changes.
also send a define to the .h
Change-Id: I53ef9c02ffa70e7d0416364525a6fbfef855e222
Signed-off-by: Rodrigo L. Rosa <rodrigorosa.lg@gmail.com>
Reviewed-on: http://openocd.zylin.com/216
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/target/dsp5680xx.c')
-rw-r--r-- | src/target/dsp5680xx.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c index 69ae7aa..bbd7995 100644 --- a/src/target/dsp5680xx.c +++ b/src/target/dsp5680xx.c @@ -40,6 +40,23 @@ int dsp5680xx_execute_queue(void){ return retval; } +/** + * Reset state machine + */ +static int reset_jtag(void){ + int retval; + tap_state_t states[2]; + const char *cp = "RESET"; + states[0] = tap_state_by_name(cp); + retval = jtag_add_statemove(states[0]); + err_check_propagate(retval); + retval = jtag_execute_queue(); + err_check_propagate(retval); + jtag_add_pathmove(0, states + 1); + retval = jtag_execute_queue(); + return retval; +} + static int dsp5680xx_drscan(struct target * target, uint8_t * data_to_shift_into_dr, uint8_t * data_shifted_out_of_dr, int len){ // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // @@ -547,7 +564,6 @@ static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t return retval; } -#define TIME_DIV_FREESCALE 0.3 /** * Puts the core into debug mode, enabling the EOnCE module. * @@ -1611,21 +1627,6 @@ int dsp5680xx_f_wr(struct target * target, uint8_t *buffer, uint32_t address, ui return retval; } -// Reset state machine -static int reset_jtag(void){ - int retval; - tap_state_t states[2]; - const char *cp = "RESET"; - states[0] = tap_state_by_name(cp); - retval = jtag_add_statemove(states[0]); - err_check_propagate(retval); - retval = jtag_execute_queue(); - err_check_propagate(retval); - jtag_add_pathmove(0, states + 1); - retval = jtag_execute_queue(); - return retval; -} - int dsp5680xx_f_unlock(struct target * target){ int retval = ERROR_OK; uint16_t eonce_status; |