target/arm_adi_v5,jtag/drivers: rename ADIv5 only defines
DP_SELECT_APSEL and DP_SELECT_APBANK is no more used in ADIv6. Change-Id: I4176574d46c6dc8eb3fe3aef6daab6e33492c050 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7538 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
eb22a37b42
commit
f49bf1adb4
|
@ -254,8 +254,8 @@ static int rshim_dp_q_write(struct adiv5_dap *dap, unsigned int reg,
|
|||
dp_ctrl_stat = data;
|
||||
break;
|
||||
case DP_SELECT:
|
||||
ap_sel = (data & DP_SELECT_APSEL) >> 24;
|
||||
ap_bank = (data & DP_SELECT_APBANK) >> 4;
|
||||
ap_sel = (data & ADIV5_DP_SELECT_APSEL) >> 24;
|
||||
ap_bank = (data & ADIV5_DP_SELECT_APBANK) >> 4;
|
||||
break;
|
||||
default:
|
||||
LOG_INFO("Unknown command");
|
||||
|
|
|
@ -1098,9 +1098,9 @@ static int vdebug_dap_queue_dp_write(struct adiv5_dap *dap, unsigned int reg, ui
|
|||
|
||||
static int vdebug_dap_queue_ap_read(struct adiv5_ap *ap, unsigned int reg, uint32_t *data)
|
||||
{
|
||||
if ((reg & DP_SELECT_APBANK) != ap->dap->select) {
|
||||
vdebug_reg_write(vdc.hsocket, pbuf, DP_SELECT >> 2, reg & DP_SELECT_APBANK, VD_ASPACE_DP, 0);
|
||||
ap->dap->select = reg & DP_SELECT_APBANK;
|
||||
if ((reg & ADIV5_DP_SELECT_APBANK) != ap->dap->select) {
|
||||
vdebug_reg_write(vdc.hsocket, pbuf, DP_SELECT >> 2, reg & ADIV5_DP_SELECT_APBANK, VD_ASPACE_DP, 0);
|
||||
ap->dap->select = reg & ADIV5_DP_SELECT_APBANK;
|
||||
}
|
||||
|
||||
vdebug_reg_read(vdc.hsocket, pbuf, (reg & DP_SELECT_DPBANK) >> 2, NULL, VD_ASPACE_AP, 0);
|
||||
|
@ -1110,9 +1110,9 @@ static int vdebug_dap_queue_ap_read(struct adiv5_ap *ap, unsigned int reg, uint3
|
|||
|
||||
static int vdebug_dap_queue_ap_write(struct adiv5_ap *ap, unsigned int reg, uint32_t data)
|
||||
{
|
||||
if ((reg & DP_SELECT_APBANK) != ap->dap->select) {
|
||||
vdebug_reg_write(vdc.hsocket, pbuf, DP_SELECT >> 2, reg & DP_SELECT_APBANK, VD_ASPACE_DP, 0);
|
||||
ap->dap->select = reg & DP_SELECT_APBANK;
|
||||
if ((reg & ADIV5_DP_SELECT_APBANK) != ap->dap->select) {
|
||||
vdebug_reg_write(vdc.hsocket, pbuf, DP_SELECT >> 2, reg & ADIV5_DP_SELECT_APBANK, VD_ASPACE_DP, 0);
|
||||
ap->dap->select = reg & ADIV5_DP_SELECT_APBANK;
|
||||
}
|
||||
|
||||
return vdebug_reg_write(vdc.hsocket, pbuf, (reg & DP_SELECT_DPBANK) >> 2, data, VD_ASPACE_AP, 0);
|
||||
|
|
|
@ -147,7 +147,7 @@ static int swd_queue_dp_write_inner(struct adiv5_dap *dap, unsigned int reg,
|
|||
swd_finish_read(dap);
|
||||
|
||||
if (reg == DP_SELECT) {
|
||||
dap->select = data & (DP_SELECT_APSEL | DP_SELECT_APBANK | DP_SELECT_DPBANK);
|
||||
dap->select = data & (ADIV5_DP_SELECT_APSEL | ADIV5_DP_SELECT_APBANK | DP_SELECT_DPBANK);
|
||||
|
||||
swd->write_reg(swd_cmd(false, false, reg), data, 0);
|
||||
|
||||
|
|
|
@ -97,16 +97,16 @@
|
|||
|
||||
#define DP_DLPIDR_PROTVSN 1u
|
||||
|
||||
#define DP_SELECT_APSEL 0xFF000000
|
||||
#define DP_SELECT_APBANK 0x000000F0
|
||||
#define DP_SELECT_DPBANK 0x0000000F
|
||||
#define DP_SELECT_INVALID 0x00FFFF00 /* Reserved bits one */
|
||||
#define ADIV5_DP_SELECT_APSEL 0xFF000000
|
||||
#define ADIV5_DP_SELECT_APBANK 0x000000F0
|
||||
#define DP_SELECT_DPBANK 0x0000000F
|
||||
#define DP_SELECT_INVALID 0x00FFFF00 /* Reserved bits one */
|
||||
|
||||
#define DP_APSEL_MAX (255) /* for ADIv5 only */
|
||||
#define DP_APSEL_INVALID 0xF00 /* more than DP_APSEL_MAX and not ADIv6 aligned 4k */
|
||||
#define DP_APSEL_MAX (255) /* Strict limit for ADIv5, number of AP buffers for ADIv6 */
|
||||
#define DP_APSEL_INVALID 0xF00 /* more than DP_APSEL_MAX and not ADIv6 aligned 4k */
|
||||
|
||||
#define DP_TARGETSEL_INVALID 0xFFFFFFFFU
|
||||
#define DP_TARGETSEL_DPID_MASK 0x0FFFFFFFU
|
||||
#define DP_TARGETSEL_INVALID 0xFFFFFFFFU
|
||||
#define DP_TARGETSEL_DPID_MASK 0x0FFFFFFFU
|
||||
#define DP_TARGETSEL_INSTANCEID_MASK 0xF0000000U
|
||||
#define DP_TARGETSEL_INSTANCEID_SHIFT 28
|
||||
|
||||
|
|
Loading…
Reference in New Issue