swd: Remove support for turnaround periods other than 1 32/2132/4
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Fri, 9 May 2014 20:50:34 +0000 (22:50 +0200)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sat, 28 Jun 2014 09:32:21 +0000 (09:32 +0000)
ARM deprecated other trn periods in ADIv5.1 and one cycle is the only
setting that is guaranteed to be implemented, as well as being the reset
value in ADIv5.0.

Thus it makes no sense supporting anything else.

Change-Id: Iffa16bb0ce74788bca88fd3ace8a026148013d00
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2132
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/jtag/drivers/cmsis_dap_usb.c
src/jtag/swd.h
src/target/adi_v5_cmsis_dap.c
src/target/adi_v5_swd.c

index 180a91b40b4293e234564420d8eae4c99c0eed45..5072de0c77eb45e4ac9ed8980ac9424a9d83684d 100644 (file)
@@ -828,7 +828,7 @@ static int cmsis_dap_init(void)
        return ERROR_OK;
 }
 
-static int cmsis_dap_swd_init(uint8_t trn)
+static int cmsis_dap_swd_init(void)
 {
        int retval;
 
index 2e676b50f4d5b2a69f24358bc01f1bb2878905f1..b0db5d2a71de335546d5a48ea3439757ee9979cc 100644 (file)
@@ -58,17 +58,13 @@ static inline uint8_t swd_cmd(bool is_read, bool is_ap, uint8_t regnum)
 struct swd_driver {
        /**
         * Initialize the debug link so it can perform SWD operations.
-        * @param trn value from WCR: how many clocks
-        * to not drive the SWDIO line at certain points in
-        * the SWD protocol (at least 1 clock).
         *
         * As an example, this would switch a dual-mode debug adapter
         * into SWD mode and out of JTAG mode.
         *
         * @return ERROR_OK on success, else a negative fault code.
         */
-       int (*init)(uint8_t trn);
-
+       int (*init)(void);
 
        /**
         * Queued read of an AP or DP register.
index 9c13e5a9287ff3008b635046568524a2ebb05bf3..9cdf08abef1ad780cffa1f1de0d0d21b477c91e9 100644 (file)
@@ -244,7 +244,7 @@ static int cmsis_dap_select(struct command_context *ctx)
                return ERROR_FAIL;
        }
 
-       retval = swd->init(1);
+       retval = swd->init();
        if (retval != ERROR_OK) {
                LOG_ERROR("unable to init CMSIS-DAP driver");
                return retval;
index 31c219e59643d002ed575716233d9bd42729d985..f08b0be0e8b3fe0b0c82d5858c1d51d3b4a854a0 100644 (file)
@@ -380,7 +380,7 @@ static int swd_select(struct command_context *ctx)
                return ERROR_FAIL;
        }
 
-       retval = swd->init(1);
+       retval = swd->init();
        if (retval != ERROR_OK) {
                LOG_DEBUG("can't init SWD driver");
                return retval;

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)