bitbang: jtag-only drivers: switch to new reset API 00/5300/3
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 4 Sep 2019 14:47:24 +0000 (16:47 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 14 Jan 2020 11:16:24 +0000 (11:16 +0000)
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>
src/jtag/drivers/at91rm9200.c
src/jtag/drivers/bitbang.c
src/jtag/drivers/bitbang.h
src/jtag/drivers/dummy.c
src/jtag/drivers/ep93xx.c
src/jtag/drivers/parport.c
src/jtag/drivers/remote_bitbang.c

index ac655635d4f39041d0738ff4a458ac84c4d07608..e2f64f53b0af723a868ff8bc2c2aaafa0a96c843 100644 (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 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);
 
 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,
 static struct bitbang_interface at91rm9200_bitbang = {
        .read = at91rm9200_read,
        .write = at91rm9200_write,
-       .reset = at91rm9200_reset,
        .blink = 0
 };
 
        .blink = 0
 };
 
@@ -196,6 +194,7 @@ struct jtag_interface at91rm9200_interface = {
        .commands = at91rm9200_command_handlers,
        .init = at91rm9200_init,
        .quit = at91rm9200_quit,
        .commands = at91rm9200_command_handlers,
        .init = at91rm9200_init,
        .quit = at91rm9200_quit,
+       .reset = at91rm9200_reset,
 };
 
 static int at91rm9200_init(void)
 };
 
 static int at91rm9200_init(void)
index b5078c080fbc3719ae66ef3bfa429e02422bc65c..72e9320b4c2bfc463846014a18e3340eae3712ce 100644 (file)
@@ -314,17 +314,6 @@ int bitbang_execute_queue(void)
 
        while (cmd) {
                switch (cmd->type) {
 
        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,
                        case JTAG_RUNTEST:
                                LOG_DEBUG_IO("runtest %i cycles, end in %s",
                                                cmd->cmd.runtest->num_cycles,
index 577717ebd241a6ba8e1ab83e6d2fd0e453ffafd4..edb779cad9409bde4d308ec3b718ef5e3b53db7c 100644 (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);
 
        /** 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);
        int (*blink)(int on);
        int (*swdio_read)(void);
        void (*swdio_drive)(bool on);
index 4e5b6152c8d7beb06dbc1ea41be65f7da116860a..739213e23346b3fdc7b686fd968fbfa2b4010c3d 100644 (file)
@@ -91,7 +91,6 @@ static int dummy_led(int on)
 static struct bitbang_interface dummy_bitbang = {
                .read = &dummy_read,
                .write = &dummy_write,
 static struct bitbang_interface dummy_bitbang = {
                .read = &dummy_read,
                .write = &dummy_write,
-               .reset = &dummy_reset,
                .blink = &dummy_led,
        };
 
                .blink = &dummy_led,
        };
 
@@ -160,4 +159,5 @@ struct jtag_interface dummy_interface = {
 
                .init = &dummy_init,
                .quit = &dummy_quit,
 
                .init = &dummy_init,
                .quit = &dummy_quit,
+               .reset = &dummy_reset,
        };
        };
index 4cf318485c5ea10c55dcd3df0d8dad54651a6458..dbbfc7ac6de5946b53ff9d32c14440050b7b25d6 100644 (file)
@@ -59,12 +59,12 @@ struct jtag_interface ep93xx_interface = {
 
        .init = ep93xx_init,
        .quit = ep93xx_quit,
 
        .init = ep93xx_init,
        .quit = ep93xx_quit,
+       .reset = ep93xx_reset,
 };
 
 static struct bitbang_interface ep93xx_bitbang = {
        .read = ep93xx_read,
        .write = ep93xx_write,
 };
 
 static struct bitbang_interface ep93xx_bitbang = {
        .read = ep93xx_read,
        .write = ep93xx_write,
-       .reset = ep93xx_reset,
        .blink = 0,
 };
 
        .blink = 0,
 };
 
index 8e44dcb797761891301c6c2847ed1bee7c5564b7..3a589a3a50b82d79c6230ae8a2eb746803756573 100644 (file)
@@ -260,7 +260,6 @@ static int parport_get_giveio_access(void)
 static struct bitbang_interface parport_bitbang = {
                .read = &parport_read,
                .write = &parport_write,
 static struct bitbang_interface parport_bitbang = {
                .read = &parport_read,
                .write = &parport_write,
-               .reset = &parport_reset,
                .blink = &parport_led,
        };
 
                .blink = &parport_led,
        };
 
@@ -522,6 +521,7 @@ struct jtag_interface parport_interface = {
 
        .init = parport_init,
        .quit = parport_quit,
 
        .init = parport_init,
        .quit = parport_quit,
+       .reset = parport_reset,
        .khz = parport_khz,
        .speed_div = parport_speed_div,
        .speed = parport_speed,
        .khz = parport_khz,
        .speed_div = parport_speed_div,
        .speed = parport_speed,
index a35489487bdefcd2ae03aea8b66f84178f30148c..70280d23e9ca065d2e19973cfc45f9821ac799e4 100644 (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,
        .sample = &remote_bitbang_sample,
        .read_sample = &remote_bitbang_read_sample,
        .write = &remote_bitbang_write,
-       .reset = &remote_bitbang_reset,
        .blink = &remote_bitbang_blink,
 };
 
        .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,
        .commands = remote_bitbang_command_handlers,
        .init = &remote_bitbang_init,
        .quit = &remote_bitbang_quit,
+       .reset = &remote_bitbang_reset,
 };
 };

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)