aboutsummaryrefslogtreecommitdiff
path: root/src/target/adi_v5_jtag.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-02-18 22:23:44 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-06-28 09:26:36 +0000
commit677b02b475870b7d9e5d86e9bf61dc28dae5a6e4 (patch)
treea683313f26d52afab8ac8c4d072d1bdc6ffdce50 /src/target/adi_v5_jtag.c
parentfd909a5e3dc6d7434bd68bea5c89ffed0f18b586 (diff)
adi_v5: Remove unused features of the DAP and SWD interfaces
These features are not currently used so remove or disable them before something starts to. Not having them around simplifies redesign of the APIs. Change-Id: Iad25cc71c48b68a1fa71558141bf14d5ab20d659 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1955 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target/adi_v5_jtag.c')
-rw-r--r--src/target/adi_v5_jtag.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c
index 7f61563f..1100b17d 100644
--- a/src/target/adi_v5_jtag.c
+++ b/src/target/adi_v5_jtag.c
@@ -342,30 +342,6 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
/*--------------------------------------------------------------------------*/
-static int jtag_idcode_q_read(struct adiv5_dap *dap,
- uint8_t *ack, uint32_t *data)
-{
- struct arm_jtag *jtag_info = dap->jtag_info;
- int retval;
- struct scan_field fields[1];
-
- /* This is a standard JTAG operation -- no DAP tweakage */
- retval = arm_jtag_set_instr(jtag_info, JTAG_DP_IDCODE, NULL, TAP_IDLE);
- if (retval != ERROR_OK)
- return retval;
-
- fields[0].num_bits = 32;
- fields[0].out_value = NULL;
- fields[0].in_value = (uint8_t *) data;
-
- jtag_add_dr_scan(jtag_info->tap, 1, fields, TAP_IDLE);
-
- jtag_add_callback(arm_le_to_h_u32,
- (jtag_callback_data_t) data);
-
- return ERROR_OK;
-}
-
static int jtag_dp_q_read(struct adiv5_dap *dap, unsigned reg,
uint32_t *data)
{
@@ -420,40 +396,6 @@ static int jtag_ap_q_write(struct adiv5_dap *dap, unsigned reg,
return adi_jtag_ap_write_check(dap, reg, out_value_buf);
}
-static int jtag_ap_q_read_block(struct adiv5_dap *dap, unsigned reg,
- uint32_t blocksize, uint8_t *buffer)
-{
- uint32_t readcount;
- int retval = ERROR_OK;
-
- /* Scan out first read */
- retval = adi_jtag_dp_scan(dap, JTAG_DP_APACC, reg,
- DPAP_READ, 0, NULL, NULL);
- if (retval != ERROR_OK)
- return retval;
-
- for (readcount = 0; readcount < blocksize - 1; readcount++) {
- /* Scan out next read; scan in posted value for the
- * previous one. Assumes read is acked "OK/FAULT",
- * and CTRL_STAT says that meant "OK".
- */
- retval = adi_jtag_dp_scan(dap, JTAG_DP_APACC, reg,
- DPAP_READ, 0, buffer + 4 * readcount,
- &dap->ack);
- if (retval != ERROR_OK)
- return retval;
- }
-
- /* Scan in last posted value; RDBUFF has no other effect,
- * assuming ack is OK/FAULT and CTRL_STAT says "OK".
- */
- retval = adi_jtag_dp_scan(dap, JTAG_DP_DPACC, DP_RDBUFF,
- DPAP_READ, 0, buffer + 4 * readcount,
- &dap->ack);
-
- return retval;
-}
-
static int jtag_ap_q_abort(struct adiv5_dap *dap, uint8_t *ack)
{
/* for JTAG, this is the only valid ABORT register operation */
@@ -470,12 +412,10 @@ static int jtag_dp_run(struct adiv5_dap *dap)
* part of DAP setup
*/
const struct dap_ops jtag_dp_ops = {
- .queue_idcode_read = jtag_idcode_q_read,
.queue_dp_read = jtag_dp_q_read,
.queue_dp_write = jtag_dp_q_write,
.queue_ap_read = jtag_ap_q_read,
.queue_ap_write = jtag_ap_q_write,
- .queue_ap_read_block = jtag_ap_q_read_block,
.queue_ap_abort = jtag_ap_q_abort,
.run = jtag_dp_run,
};