bitbang: jtag-only drivers: switch to new reset API

Remove the JTAG_RESET command from the bitbang execute queue now
that all bitbang drivers have moved away from old reset method.
Remove also the internal reset API in struct bitbang_interface.

Tested parport only.

Change-Id: I12b157ef442f4c9912406b19b7a4d32ba6ec0b53
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5300
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Antonio Borneo 2019-09-04 16:47:24 +02:00 committed by Tomas Vanek
parent 8850eb8f2c
commit 9daec098a9
7 changed files with 5 additions and 18 deletions

View File

@ -111,7 +111,6 @@ static uint32_t *pio_base;
*/
static bb_value_t at91rm9200_read(void);
static int at91rm9200_write(int tck, int tms, int tdi);
static int at91rm9200_reset(int trst, int srst);
static int at91rm9200_init(void);
static int at91rm9200_quit(void);
@ -119,7 +118,6 @@ static int at91rm9200_quit(void);
static struct bitbang_interface at91rm9200_bitbang = {
.read = at91rm9200_read,
.write = at91rm9200_write,
.reset = at91rm9200_reset,
.blink = 0
};
@ -196,6 +194,7 @@ struct jtag_interface at91rm9200_interface = {
.commands = at91rm9200_command_handlers,
.init = at91rm9200_init,
.quit = at91rm9200_quit,
.reset = at91rm9200_reset,
};
static int at91rm9200_init(void)

View File

@ -314,17 +314,6 @@ int bitbang_execute_queue(void)
while (cmd) {
switch (cmd->type) {
case JTAG_RESET:
LOG_DEBUG_IO("reset trst: %i srst %i",
cmd->cmd.reset->trst,
cmd->cmd.reset->srst);
if ((cmd->cmd.reset->trst == 1) ||
(cmd->cmd.reset->srst && (jtag_get_reset_config() & RESET_SRST_PULLS_TRST)))
tap_set_state(TAP_RESET);
if (bitbang_interface->reset(cmd->cmd.reset->trst,
cmd->cmd.reset->srst) != ERROR_OK)
return ERROR_FAIL;
break;
case JTAG_RUNTEST:
LOG_DEBUG_IO("runtest %i cycles, end in %s",
cmd->cmd.runtest->num_cycles,

View File

@ -51,7 +51,6 @@ struct bitbang_interface {
/** Set TCK, TMS, and TDI to the given values. */
int (*write)(int tck, int tms, int tdi);
int (*reset)(int trst, int srst);
int (*blink)(int on);
int (*swdio_read)(void);
void (*swdio_drive)(bool on);

View File

@ -91,7 +91,6 @@ static int dummy_led(int on)
static struct bitbang_interface dummy_bitbang = {
.read = &dummy_read,
.write = &dummy_write,
.reset = &dummy_reset,
.blink = &dummy_led,
};
@ -160,4 +159,5 @@ struct jtag_interface dummy_interface = {
.init = &dummy_init,
.quit = &dummy_quit,
.reset = &dummy_reset,
};

View File

@ -59,12 +59,12 @@ struct jtag_interface ep93xx_interface = {
.init = ep93xx_init,
.quit = ep93xx_quit,
.reset = ep93xx_reset,
};
static struct bitbang_interface ep93xx_bitbang = {
.read = ep93xx_read,
.write = ep93xx_write,
.reset = ep93xx_reset,
.blink = 0,
};

View File

@ -260,7 +260,6 @@ static int parport_get_giveio_access(void)
static struct bitbang_interface parport_bitbang = {
.read = &parport_read,
.write = &parport_write,
.reset = &parport_reset,
.blink = &parport_led,
};
@ -522,6 +521,7 @@ struct jtag_interface parport_interface = {
.init = parport_init,
.quit = parport_quit,
.reset = parport_reset,
.khz = parport_khz,
.speed_div = parport_speed_div,
.speed = parport_speed,

View File

@ -199,7 +199,6 @@ static struct bitbang_interface remote_bitbang_bitbang = {
.sample = &remote_bitbang_sample,
.read_sample = &remote_bitbang_read_sample,
.write = &remote_bitbang_write,
.reset = &remote_bitbang_reset,
.blink = &remote_bitbang_blink,
};
@ -349,4 +348,5 @@ struct jtag_interface remote_bitbang_interface = {
.commands = remote_bitbang_command_handlers,
.init = &remote_bitbang_init,
.quit = &remote_bitbang_quit,
.reset = &remote_bitbang_reset,
};