This is an automated email from Gerrit.

Marc Schink (openocd-...@marcschink.de) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5231

-- gerrit

commit 4c8291e2f9132cfccd8ac04bb65b320b06a9ce7f
Author: Marc Schink <openocd-...@marcschink.de>
Date:   Fri Jun 14 08:08:47 2019 +0200

    target/arm_adiv5: Add type for AHB5-AP
    
    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-...@marcschink.de>

diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index d772d5c..d2ec960 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -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");
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 50fd359..5eca1d3 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -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 = 0x05, /* AHB5 Memory-AP. */
 };
 
 /**
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index ce3ab09..1fe14d7 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -2084,7 +2084,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;

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to