diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c index df557c5c6..f547d93a4 100644 --- a/src/jtag/drivers/bcm2835gpio.c +++ b/src/jtag/drivers/bcm2835gpio.c @@ -535,7 +535,6 @@ static int bcm2835gpio_init(void) if (swd_mode) { bcm2835gpio_bitbang.write = bcm2835gpio_swd_write; - bitbang_switch_to_swd(); } return ERROR_OK; diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c index 72e9320b4..e5df3cf40 100644 --- a/src/jtag/drivers/bitbang.c +++ b/src/jtag/drivers/bitbang.c @@ -416,7 +416,7 @@ static void bitbang_exchange(bool rnw, uint8_t buf[], unsigned int offset, unsig } } -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"); @@ -441,12 +441,6 @@ int bitbang_swd_switch_seq(enum swd_special_seq seq) return ERROR_OK; } -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), diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h index 7516c24a6..52dfbda30 100644 --- a/src/jtag/drivers/bitbang.h +++ b/src/jtag/drivers/bitbang.h @@ -71,7 +71,5 @@ extern bool swd_mode; 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 */ diff --git a/src/jtag/drivers/imx_gpio.c b/src/jtag/drivers/imx_gpio.c index 7dcfb6790..debddedfe 100644 --- a/src/jtag/drivers/imx_gpio.c +++ b/src/jtag/drivers/imx_gpio.c @@ -552,7 +552,6 @@ static int imx_gpio_init(void) if (swd_mode) { imx_gpio_bitbang.write = imx_gpio_swd_write; - bitbang_switch_to_swd(); } return ERROR_OK; diff --git a/src/jtag/drivers/sysfsgpio.c b/src/jtag/drivers/sysfsgpio.c index a4d7ad9ec..f9470a47b 100644 --- a/src/jtag/drivers/sysfsgpio.c +++ b/src/jtag/drivers/sysfsgpio.c @@ -694,13 +694,6 @@ static int sysfsgpio_init(void) goto out_error; } - 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: