diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2021-04-06 15:04:31 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-20 14:47:54 +0000 |
commit | d2033997871f8561d1406550c12508461f63de48 (patch) | |
tree | aac6fc460ca8cde6ddced3f880aa01518ddeb522 /src/target/arm_adi_v5.h | |
parent | b973a76d8663dec254084d0d86d93762a2873805 (diff) | |
download | riscv-openocd-d2033997871f8561d1406550c12508461f63de48.zip riscv-openocd-d2033997871f8561d1406550c12508461f63de48.tar.gz riscv-openocd-d2033997871f8561d1406550c12508461f63de48.tar.bz2 |
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>
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r-- | src/target/arm_adi_v5.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 1c96dc8..758cfa0 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -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 |