aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm_adi_v5.h
diff options
context:
space:
mode:
authorEvan Hunter <ehunter@broadcom.com>2012-10-12 09:07:45 +1100
committerSpencer Oliver <spen@spen-soft.co.uk>2013-03-15 15:53:36 +0000
commit4e47519f6c519b792297efaa482852cd9eef554a (patch)
treefb33559c958e7ce65936f00ba5a4182317ba35e2 /src/target/arm_adi_v5.h
parent927e53f8d5e6ebaf52be82cb7300cbbb471a92bb (diff)
adi_v5: search for Debug and Memory AP support
Adds dap_find_ap() function. Change-Id: I6643025624009b12d4936de67a605da52c07be49 Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/909 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r--src/target/arm_adi_v5.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index bab3292a..7f1ebf5e 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -224,6 +224,15 @@ struct dap_ops {
int (*run)(struct adiv5_dap *dap);
};
+/*
+ * Access Port types
+ */
+enum ap_type {
+ AP_TYPE_AHB_AP = 0x01, /* AHB Memory-AP */
+ AP_TYPE_APB_AP = 0x02, /* APB Memory-AP */
+ AP_TYPE_JTAG_AP = 0x10 /* JTAG-AP - JTAG master for controlling other JTAG devices */
+};
+
/**
* Queue an IDCODE register read. This is primarily useful for SWD
* transports, where it is required as part of link initialization.
@@ -423,6 +432,11 @@ int ahbap_debugport_init(struct adiv5_dap *swjdp);
int dap_get_debugbase(struct adiv5_dap *dap, int ap,
uint32_t *dbgbase, uint32_t *apid);
+/* Probe Access Ports to find a particular type */
+int dap_find_ap(struct adiv5_dap *dap,
+ enum ap_type type_to_find,
+ uint8_t *ap_num_out);
+
/* Lookup CoreSight component */
int dap_lookup_cs_component(struct adiv5_dap *dap, int ap,
uint32_t dbgbase, uint8_t type, uint32_t *addr);