forked from auracaster/openocd
target/adi_v5_swd: add support for SWD multidrop
Based on Graham Sanderson's http://review.openocd.org/4935 Unlike Graham Sanderson's version this patch does not add any multidrop specific queuing. Multidrop SWD is handled mostly by the same code as single SWD, just a selection sequence is prepended to a SWD operation as needed. This is a minimal working implementation without checking for configuration errors (mixing multidrop and non multidrop DPs, multiple use of the same selection id etc...). Multidrop switching likely demands changes in the adapter code. Change-Id: I99a5742c209b49c0483e800f6105cb5e59a897d9 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6141 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
b973a76d86
commit
d203399787
@@ -65,6 +65,10 @@
|
||||
|
||||
#define DLCR_TO_TRN(dlcr) ((uint32_t)(1 + ((3 & (dlcr)) >> 8))) /* 1..4 clocks */
|
||||
|
||||
/* Fields of DP_DPIDR register */
|
||||
#define DP_DPIDR_VERSION_SHIFT 12
|
||||
#define DP_DPIDR_VERSION_MASK (0xFUL << DP_DPIDR_VERSION_SHIFT)
|
||||
|
||||
/* Fields of the DP's AP ABORT register */
|
||||
#define DAPABORT (1UL << 0)
|
||||
#define STKCMPCLR (1UL << 1) /* SWD-only */
|
||||
@@ -89,6 +93,8 @@
|
||||
#define CSYSPWRUPREQ (1UL << 30)
|
||||
#define CSYSPWRUPACK (1UL << 31)
|
||||
|
||||
#define DP_DLPIDR_PROTVSN 1u
|
||||
|
||||
#define DP_SELECT_APSEL 0xFF000000
|
||||
#define DP_SELECT_APBANK 0x000000F0
|
||||
#define DP_SELECT_DPBANK 0x0000000F
|
||||
|
||||
Reference in New Issue
Block a user