target/arm_adiv5: Add type for AHB5-AP 31/5231/6
authorMarc Schink <openocd-dev@marcschink.de>
Fri, 14 Jun 2019 06:08:47 +0000 (08:08 +0200)
committerMatthias Welwarsky <matthias@welwarsky.de>
Wed, 19 Jun 2019 08:51:54 +0000 (09:51 +0100)
This access port type comes with the AMBA 5 protocol specification,
see 'C1.3 AP' in ARM IHI 0031D.

Change-Id: I3c4f0a69230daaf4f5f979de6213fe3c025a089a
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/5231
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Muhammad Omair Javaid <omair.javaid@linaro.org>
src/target/arm_adi_v5.c
src/target/arm_adi_v5.h
src/target/cortex_m.c

index d772d5c2956d8f1be8633702c95a5cf2f32f93b5..d2ec960a82076f2ab7b3eba7c9b78b578a89da11 100644 (file)
@@ -914,7 +914,8 @@ int dap_find_ap(struct adiv5_dap *dap, enum ap_type type_to_find, struct adiv5_a
                        ((id_val & IDR_TYPE) == type_to_find)) {      /* type matches*/
 
                        LOG_DEBUG("Found %s at AP index: %d (IDR=0x%08" PRIX32 ")",
-                                               (type_to_find == AP_TYPE_AHB_AP)  ? "AHB-AP"  :
+                                               (type_to_find == AP_TYPE_AHB3_AP)  ? "AHB3-AP"  :
+                                               (type_to_find == AP_TYPE_AHB5_AP)  ? "AHB5-AP"  :
                                                (type_to_find == AP_TYPE_APB_AP)  ? "APB-AP"  :
                                                (type_to_find == AP_TYPE_AXI_AP)  ? "AXI-AP"  :
                                                (type_to_find == AP_TYPE_JTAG_AP) ? "JTAG-AP" : "Unknown",
@@ -926,7 +927,8 @@ int dap_find_ap(struct adiv5_dap *dap, enum ap_type type_to_find, struct adiv5_a
        }
 
        LOG_DEBUG("No %s found",
-                               (type_to_find == AP_TYPE_AHB_AP)  ? "AHB-AP"  :
+                               (type_to_find == AP_TYPE_AHB3_AP)  ? "AHB3-AP"  :
+                               (type_to_find == AP_TYPE_AHB5_AP)  ? "AHB5-AP"  :
                                (type_to_find == AP_TYPE_APB_AP)  ? "APB-AP"  :
                                (type_to_find == AP_TYPE_AXI_AP)  ? "AXI-AP"  :
                                (type_to_find == AP_TYPE_JTAG_AP) ? "JTAG-AP" : "Unknown");
@@ -1466,8 +1468,11 @@ int dap_info_command(struct command_invocation *cmd,
        case IDR_JEP106_ARM | AP_TYPE_JTAG_AP:
                command_print(cmd, "\tType is JTAG-AP");
                break;
-       case IDR_JEP106_ARM | AP_TYPE_AHB_AP:
-               command_print(cmd, "\tType is MEM-AP AHB");
+       case IDR_JEP106_ARM | AP_TYPE_AHB3_AP:
+               command_print(cmd, "\tType is MEM-AP AHB3");
+               break;
+       case IDR_JEP106_ARM | AP_TYPE_AHB5_AP:
+               command_print(cmd, "\tType is MEM-AP AHB5");
                break;
        case IDR_JEP106_ARM | AP_TYPE_APB_AP:
                command_print(cmd, "\tType is MEM-AP APB");
index 50fd359c88af3f24be1f5b25a410eca0522ceb95..6e2d8a182dfa0c47d95ee7d60a8b27600dc028f0 100644 (file)
@@ -326,9 +326,10 @@ enum ap_class {
  */
 enum ap_type {
        AP_TYPE_JTAG_AP = 0x0,  /* JTAG-AP - JTAG master for controlling other JTAG devices */
-       AP_TYPE_AHB_AP  = 0x1,  /* AHB Memory-AP */
+       AP_TYPE_AHB3_AP = 0x1,  /* AHB3 Memory-AP */
        AP_TYPE_APB_AP  = 0x2,  /* APB Memory-AP */
        AP_TYPE_AXI_AP  = 0x4,  /* AXI Memory-AP */
+       AP_TYPE_AHB5_AP = 0x5,  /* AHB5 Memory-AP. */
 };
 
 /**
index 9aaa5bb8763a19885e7700066b5ac4fffeb567f8..ed9397aef0f6e0ff714d168fb91036f3b3411f5c 100644 (file)
@@ -2107,7 +2107,7 @@ int cortex_m_examine(struct target *target)
        if (!armv7m->stlink) {
                if (cortex_m->apsel == DP_APSEL_INVALID) {
                        /* Search for the MEM-AP */
-                       retval = dap_find_ap(swjdp, AP_TYPE_AHB_AP, &armv7m->debug_ap);
+                       retval = dap_find_ap(swjdp, AP_TYPE_AHB3_AP, &armv7m->debug_ap);
                        if (retval != ERROR_OK) {
                                LOG_ERROR("Could not find MEM-AP to control the core");
                                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)