cortex_m: Discover the AP to use, just like Cortex-A

This required fixing the AP ID parsing in dap_find_ap() to
match IHI0031C. The AXI type was added too.

Change-Id: I44577a7848df37586e650dce0fb57ac26f5f858c
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3146
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
This commit is contained in:
Andreas Fritiofson
2015-12-06 01:21:41 +01:00
parent cd12c423dc
commit beb843d28d
3 changed files with 18 additions and 7 deletions

View File

@@ -279,9 +279,10 @@ struct dap_ops {
* 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 */
AP_TYPE_JTAG_AP = 0x0, /* JTAG-AP - JTAG master for controlling other JTAG devices */
AP_TYPE_AHB_AP = 0x1, /* AHB Memory-AP */
AP_TYPE_APB_AP = 0x2, /* APB Memory-AP */
AP_TYPE_AXI_AP = 0x4, /* AXI Memory-AP */
};
/**