The SWD framework already takes care of switching between JTAG and
SWD by calling driver's switch_seq() in swd_connect() and in
swd_quit(); there is no need for the driver to force the switch
again.
Remove the extra switch between jtag and swd.
Change-Id: I84de4bffb593374b96fce31951c6cc83f92d2578
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5554
Tested-by: jenkins
if (swd_mode) {
bcm2835gpio_bitbang.write = bcm2835gpio_swd_write;
if (swd_mode) {
bcm2835gpio_bitbang.write = bcm2835gpio_swd_write;
- bitbang_switch_to_swd();
-int bitbang_swd_switch_seq(enum swd_special_seq seq)
+static int bitbang_swd_switch_seq(enum swd_special_seq seq)
{
LOG_DEBUG("bitbang_swd_switch_seq");
{
LOG_DEBUG("bitbang_swd_switch_seq");
-void bitbang_switch_to_swd(void)
-{
- LOG_DEBUG("bitbang_switch_to_swd");
- bitbang_exchange(false, (uint8_t *)swd_seq_jtag_to_swd, 0, swd_seq_jtag_to_swd_len);
-}
-
static void swd_clear_sticky_errors(void)
{
bitbang_swd_write_reg(swd_cmd(false, false, DP_ABORT),
static void swd_clear_sticky_errors(void)
{
bitbang_swd_write_reg(swd_cmd(false, false, DP_ABORT),
int bitbang_execute_queue(void);
extern struct bitbang_interface *bitbang_interface;
int bitbang_execute_queue(void);
extern struct bitbang_interface *bitbang_interface;
-void bitbang_switch_to_swd(void);
-int bitbang_swd_switch_seq(enum swd_special_seq seq);
#endif /* OPENOCD_JTAG_DRIVERS_BITBANG_H */
#endif /* OPENOCD_JTAG_DRIVERS_BITBANG_H */
if (swd_mode) {
imx_gpio_bitbang.write = imx_gpio_swd_write;
if (swd_mode) {
imx_gpio_bitbang.write = imx_gpio_swd_write;
- bitbang_switch_to_swd();
- if (sysfsgpio_swd_mode_possible()) {
- if (swd_mode)
- bitbang_swd_switch_seq(JTAG_TO_SWD);
- else
- bitbang_swd_switch_seq(SWD_TO_JTAG);
- }
-
return ERROR_OK;
out_error:
return ERROR_OK;
out_error: