adiv6: add low level jtag transport
swd and dap-direct are not implemented yet Split from change https://review.openocd.org/6077/ Change-Id: I6d73d8adf6a6090001c5d4771325fb1d63c45e3c 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/+/6459 Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
edb575800a
commit
8f8fb0fa79
@@ -282,6 +282,14 @@ static int rshim_ap_q_read(struct adiv5_ap *ap, unsigned int reg,
|
||||
uint32_t addr;
|
||||
int rc = ERROR_OK, tile;
|
||||
|
||||
if (is_adiv6(ap->dap)) {
|
||||
static bool error_flagged;
|
||||
if (!error_flagged)
|
||||
LOG_ERROR("ADIv6 dap not supported by rshim dap-direct mode");
|
||||
error_flagged = true;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
switch (reg) {
|
||||
case ADIV5_MEM_AP_REG_CSW:
|
||||
*data = ap_csw;
|
||||
@@ -338,6 +346,14 @@ static int rshim_ap_q_write(struct adiv5_ap *ap, unsigned int reg,
|
||||
int rc = ERROR_OK, tile;
|
||||
uint32_t addr;
|
||||
|
||||
if (is_adiv6(ap->dap)) {
|
||||
static bool error_flagged;
|
||||
if (!error_flagged)
|
||||
LOG_ERROR("ADIv6 dap not supported by rshim dap-direct mode");
|
||||
error_flagged = true;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
if (ap_bank != 0) {
|
||||
rshim_dap_retval = ERROR_FAIL;
|
||||
return ERROR_FAIL;
|
||||
|
||||
@@ -4286,6 +4286,14 @@ static int stlink_dap_ap_read(struct adiv5_ap *ap, unsigned int reg, uint32_t *d
|
||||
uint32_t dummy;
|
||||
int retval;
|
||||
|
||||
if (is_adiv6(dap)) {
|
||||
static bool error_flagged;
|
||||
if (!error_flagged)
|
||||
LOG_ERROR("ADIv6 dap not supported by stlink dap-direct mode");
|
||||
error_flagged = true;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
if (reg != ADIV5_AP_REG_IDR) {
|
||||
retval = stlink_dap_open_ap(ap->ap_num);
|
||||
if (retval != ERROR_OK)
|
||||
@@ -4304,6 +4312,14 @@ static int stlink_dap_ap_write(struct adiv5_ap *ap, unsigned int reg, uint32_t d
|
||||
struct adiv5_dap *dap = ap->dap;
|
||||
int retval;
|
||||
|
||||
if (is_adiv6(dap)) {
|
||||
static bool error_flagged;
|
||||
if (!error_flagged)
|
||||
LOG_ERROR("ADIv6 dap not supported by stlink dap-direct mode");
|
||||
error_flagged = true;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
retval = stlink_dap_open_ap(ap->ap_num);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user