summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm7tdmi.c4
-rw-r--r--src/target/arm920t.c12
-rw-r--r--src/target/embeddedice.c18
-rw-r--r--src/target/etm.c8
-rw-r--r--src/target/feroceon.c4
5 files changed, 34 insertions, 12 deletions
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 8befe2bf..f4ba44ac 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -120,7 +120,9 @@ static __inline int arm7tdmi_clock_out(struct arm_jtag *jtag_info,
uint32_t out, uint32_t *deprecated, int breakpoint)
{
int retval;
- arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
+ retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
if (retval != ERROR_OK)
return retval;
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index c5064c11..90f548f3 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -93,7 +93,9 @@ static int arm920t_read_cp15_physical(struct target *target,
jtag_info = &arm920t->arm7_9_common.jtag_info;
- arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
@@ -146,7 +148,9 @@ static int arm920t_write_cp15_physical(struct target *target,
buf_set_u32(value_buf, 0, 32, value);
- arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
@@ -197,7 +201,9 @@ static int arm920t_execute_cp15(struct target *target, uint32_t cp15_opcode,
jtag_info = &arm920t->arm7_9_common.jtag_info;
- arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c
index 965260ca..abc49d7e 100644
--- a/src/target/embeddedice.c
+++ b/src/target/embeddedice.c
@@ -346,7 +346,9 @@ int embeddedice_read_reg_w_check(struct reg *reg,
uint8_t field2_out[1];
int retval;
- arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
+ retval = arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
@@ -410,7 +412,9 @@ int embeddedice_receive(struct arm_jtag *jtag_info, uint32_t *data, uint32_t siz
uint8_t field2_out[1];
int retval;
- arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
@@ -497,7 +501,7 @@ void embeddedice_write_reg(struct reg *reg, uint32_t value)
LOG_DEBUG("%i: 0x%8.8" PRIx32 "", ice_reg->addr, value);
- arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
+ retval = arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
retval = arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
@@ -530,7 +534,9 @@ int embeddedice_send(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size)
uint8_t field2_out[1];
int retval;
- arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
@@ -584,7 +590,9 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou
else
return ERROR_INVALID_ARGUMENTS;
- arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
diff --git a/src/target/etm.c b/src/target/etm.c
index 5c42fb59..9da69550 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -505,7 +505,9 @@ static int etm_read_reg_w_check(struct reg *reg,
LOG_DEBUG("%s (%u)", r->name, reg_addr);
- arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+ retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
@@ -589,7 +591,9 @@ static int etm_write_reg(struct reg *reg, uint32_t value)
LOG_DEBUG("%s (%u): 0x%8.8" PRIx32 "", r->name, reg_addr, value);
- arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+ retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
if (retval != ERROR_OK)
return retval;
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index 6ca432a8..2152a260 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -85,7 +85,9 @@ static int feroceon_dummy_clock_out(struct arm_jtag *jtag_info, uint32_t instr)
buf_set_u32(instr_buf, 0, 32, flip_u32(instr, 32));
- arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
+ retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
+ if (retval != ERROR_OK)
+ return retval;
retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
if (retval != ERROR_OK)