adiv6: re-organize mem_ap registers definition
commita6e4aabc66a2335c1bc0da1640df4eefd9a4d604
authorKevin Burke <kevinb@os.amperecomputing.com>
Sat, 21 Aug 2021 17:12:01 +0000 (21 19:12 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 24 Jun 2022 21:34:51 +0000 (24 21:34 +0000)
tree2c5f591d362d98ac331e4bf966c2305c173539b5
parent1fe82f9f1db62f0ab59471e1cdaf02643bf7a66c
adiv6: re-organize mem_ap registers definition

ADIv5 MEM-AP registers are a subset of ADIv6 MEM-AP registers and
are located at different offset.

To prepare for introducing ADIv6, add 'struct adiv5_dap *' as
argument to ADIv5 registers macro.
Check the ADI version and use the proper address.
Both adapter drivers rshim and stlink are ADIv5 only, so let them
use the ADIv5 macros only.

Split from change https://review.openocd.org/6077/

Change-Id: Ib861ddcdab74637b2082cc9f2612dea0007d77b1
Signed-off-by: Kevin Burke <kevinb@os.amperecomputing.com>
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6457
Tested-by: jenkins
src/jtag/drivers/rshim.c
src/jtag/drivers/stlink_usb.c
src/target/adi_v5_jtag.c
src/target/arm_adi_v5.c
src/target/arm_adi_v5.h