arm_adi_v5: Add a back-pointer from an AP to its DAP 44/3144/2
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Fri, 13 Nov 2015 23:51:40 +0000 (00:51 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Tue, 29 Dec 2015 20:27:26 +0000 (20:27 +0000)
This will make it possible to reference directly the AP used for debug
in the target instance and remove the DAP reference. This will in turn
enable getting rid of the need to select an "active" AP in the DAP (using
dap apsel).

Change-Id: I265846a427c714204f4fd3df3cdb75843686c2d0
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3144
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
src/target/arm_adi_v5.c
src/target/arm_adi_v5.h

index 70ef302dc44f47a3d9fe970a02dd900513ae077b..53c0c4e15ae0af1dfb8de12645ac31b6506c4f1c 100644 (file)
@@ -638,6 +638,8 @@ struct adiv5_dap *dap_init(void)
        int i;
        /* Set up with safe defaults */
        for (i = 0; i <= 255; i++) {
+               dap->ap[i].dap = dap;
+               dap->ap[i].ap_num = i;
                /* memaccess_tck max is 255 */
                dap->ap[i].memaccess_tck = 255;
                /* Number of bits for tar autoincrement, impl. dep. at least 10 */
index 186397e896bb032e267d4fb0386e383bbea7765f..32b723959ab140813802a014239a2bd4d94dd6af 100644 (file)
  * Most common is a MEM-AP, for memory access.
  */
 struct adiv5_ap {
+       /**
+        * DAP this AP belongs to.
+        */
+       struct adiv5_dap *dap;
+
+       /**
+        * Number of this AP.
+        */
+       uint8_t ap_num;
+
        /**
         * Default value for (MEM-AP) AP_REG_CSW register.
         */

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)