1 /***************************************************************************
2 * Copyright (C) 2006 by Magnus Lundin
5 * Copyright (C) 2008 by Spencer Oliver
8 * Copyright (C) 2009 by Oyvind Harboe
9 * oyvind.harboe@zylin.com
11 * Copyright (C) 2009-2010 by David Brownell
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 ***************************************************************************/
29 * This file implements JTAG transport support for cores implementing
30 the ARM Debug Interface version 5 (ADIv5).
38 #include "arm_adi_v5.h"
39 #include <helper/time_support.h>
40 #include <helper/list.h>
43 /*#define DEBUG_WAIT*/
45 /* JTAG instructions/registers for JTAG-DP and SWJ-DP */
46 #define JTAG_DP_ABORT 0x8
47 #define JTAG_DP_DPACC 0xA
48 #define JTAG_DP_APACC 0xB
49 #define JTAG_DP_IDCODE 0xE
51 /* three-bit ACK values for DPACC and APACC reads */
52 #define JTAG_ACK_OK_FAULT 0x2
53 #define JTAG_ACK_WAIT 0x1
55 static int jtag_ap_q_abort(struct adiv5_dap *dap, uint8_t *ack);
58 static const char *dap_reg_name(int instr, int reg_addr)
60 char *reg_name = "UNK";
62 if (instr == JTAG_DP_DPACC) {
68 reg_name = "CTRL/STAT";
85 if (instr == JTAG_DP_APACC) {
111 case MEM_AP_REG_BASE:
134 uint32_t memaccess_tck;
137 struct scan_field fields[2];
138 uint8_t out_addr_buf;
139 uint8_t invalue_buf[4];
140 uint8_t outvalue_buf[4];
143 #define MAX_DAP_COMMAND_NUM 65536
145 struct dap_cmd_pool {
150 static void log_dap_cmd(const char *header, struct dap_cmd *el)
153 LOG_DEBUG("%s: %2s %6s %5s 0x%08x 0x%08x %2s", header,
154 el->instr == JTAG_DP_APACC ? "AP" : "DP",
155 dap_reg_name(el->instr, el->reg_addr),
156 el->rnw == DPAP_READ ? "READ" : "WRITE",
157 buf_get_u32(el->outvalue_buf, 0, 32),
158 buf_get_u32(el->invalue, 0, 32),
159 el->ack == JTAG_ACK_OK_FAULT ? "OK" :
160 (el->ack == JTAG_ACK_WAIT ? "WAIT" : "INVAL"));
164 static int jtag_limit_queue_size(struct adiv5_dap *dap)
166 if (dap->cmd_pool_size < MAX_DAP_COMMAND_NUM)
172 static struct dap_cmd *dap_cmd_new(struct adiv5_dap *dap, uint8_t instr,
173 uint8_t reg_addr, uint8_t rnw,
174 uint8_t *outvalue, uint8_t *invalue,
175 uint32_t memaccess_tck)
178 struct dap_cmd_pool *pool = NULL;
180 if (list_empty(&dap->cmd_pool)) {
181 pool = calloc(1, sizeof(struct dap_cmd_pool));
185 pool = list_first_entry(&dap->cmd_pool, struct dap_cmd_pool, lh);
189 INIT_LIST_HEAD(&pool->lh);
190 dap->cmd_pool_size++;
192 struct dap_cmd *cmd = &pool->cmd;
193 INIT_LIST_HEAD(&cmd->lh);
195 cmd->reg_addr = reg_addr;
197 if (outvalue != NULL)
198 memcpy(cmd->outvalue_buf, outvalue, 4);
199 cmd->invalue = (invalue != NULL) ? invalue : cmd->invalue_buf;
200 cmd->memaccess_tck = memaccess_tck;
205 static void dap_cmd_release(struct adiv5_dap *dap, struct dap_cmd *cmd)
207 struct dap_cmd_pool *pool = container_of(cmd, struct dap_cmd_pool, cmd);
208 if (dap->cmd_pool_size > MAX_DAP_COMMAND_NUM)
211 list_add(&pool->lh, &dap->cmd_pool);
213 dap->cmd_pool_size--;
216 static void flush_journal(struct adiv5_dap *dap, struct list_head *lh)
218 struct dap_cmd *el, *tmp;
220 list_for_each_entry_safe(el, tmp, lh, lh) {
222 dap_cmd_release(dap, el);
226 static void jtag_quit(struct adiv5_dap *dap)
228 struct dap_cmd_pool *el, *tmp;
229 struct list_head *lh = &dap->cmd_pool;
231 list_for_each_entry_safe(el, tmp, lh, lh) {
237 /***************************************************************************
239 * DPACC and APACC scanchain access through JTAG-DP (or SWJ-DP)
241 ***************************************************************************/
243 static int adi_jtag_dp_scan_cmd(struct adiv5_dap *dap, struct dap_cmd *cmd, uint8_t *ack)
245 struct jtag_tap *tap = dap->tap;
248 retval = arm_jtag_set_instr(tap, cmd->instr, NULL, TAP_IDLE);
249 if (retval != ERROR_OK)
252 /* Scan out a read or write operation using some DP or AP register.
253 * For APACC access with any sticky error flag set, this is discarded.
255 cmd->fields[0].num_bits = 3;
256 buf_set_u32(&cmd->out_addr_buf, 0, 3, ((cmd->reg_addr >> 1) & 0x6) | (cmd->rnw & 0x1));
257 cmd->fields[0].out_value = &cmd->out_addr_buf;
258 cmd->fields[0].in_value = (ack != NULL) ? ack : &cmd->ack;
260 /* NOTE: if we receive JTAG_ACK_WAIT, the previous operation did not
261 * complete; data we write is discarded, data we read is unpredictable.
262 * When overrun detect is active, STICKYORUN is set.
265 cmd->fields[1].num_bits = 32;
266 cmd->fields[1].out_value = cmd->outvalue_buf;
267 cmd->fields[1].in_value = cmd->invalue;
269 jtag_add_dr_scan(tap, 2, cmd->fields, TAP_IDLE);
271 /* Add specified number of tck clocks after starting memory bus
272 * access, giving the hardware time to complete the access.
273 * They provide more time for the (MEM) AP to complete the read ...
274 * See "Minimum Response Time" for JTAG-DP, in the ADIv5 spec.
276 if (cmd->instr == JTAG_DP_APACC) {
277 if (((cmd->reg_addr == MEM_AP_REG_DRW)
278 || ((cmd->reg_addr & 0xF0) == MEM_AP_REG_BD0))
279 && (cmd->memaccess_tck != 0))
280 jtag_add_runtest(cmd->memaccess_tck, TAP_IDLE);
286 static int adi_jtag_dp_scan_cmd_sync(struct adiv5_dap *dap, struct dap_cmd *cmd, uint8_t *ack)
290 retval = adi_jtag_dp_scan_cmd(dap, cmd, ack);
291 if (retval != ERROR_OK)
294 return jtag_execute_queue();
298 * Scan DPACC or APACC using target ordered uint8_t buffers. No endianness
299 * conversions are performed. See section 4.4.3 of the ADIv5 spec, which
300 * discusses operations which access these registers.
302 * Note that only one scan is performed. If rnw is set, a separate scan
303 * will be needed to collect the data which was read; the "invalue" collects
304 * the posted result of a preceding operation, not the current one.
307 * @param instr JTAG_DP_APACC (AP access) or JTAG_DP_DPACC (DP access)
308 * @param reg_addr two significant bits; A[3:2]; for APACC access, the
309 * SELECT register has more addressing bits.
310 * @param rnw false iff outvalue will be written to the DP or AP
311 * @param outvalue points to a 32-bit (little-endian) integer
312 * @param invalue NULL, or points to a 32-bit (little-endian) integer
313 * @param ack points to where the three bit JTAG_ACK_* code will be stored
314 * @param memaccess_tck number of idle cycles to add after AP access
317 static int adi_jtag_dp_scan(struct adiv5_dap *dap,
318 uint8_t instr, uint8_t reg_addr, uint8_t rnw,
319 uint8_t *outvalue, uint8_t *invalue,
320 uint32_t memaccess_tck, uint8_t *ack)
325 cmd = dap_cmd_new(dap, instr, reg_addr, rnw, outvalue, invalue, memaccess_tck);
327 cmd->dp_select = dap->select;
329 return ERROR_JTAG_DEVICE_ERROR;
331 retval = adi_jtag_dp_scan_cmd(dap, cmd, ack);
332 if (retval == ERROR_OK)
333 list_add_tail(&cmd->lh, &dap->cmd_journal);
339 * Scan DPACC or APACC out and in from host ordered uint32_t buffers.
340 * This is exactly like adi_jtag_dp_scan(), except that endianness
341 * conversions are performed (so the types of invalue and outvalue
342 * must be different).
344 static int adi_jtag_dp_scan_u32(struct adiv5_dap *dap,
345 uint8_t instr, uint8_t reg_addr, uint8_t rnw,
346 uint32_t outvalue, uint32_t *invalue,
347 uint32_t memaccess_tck, uint8_t *ack)
349 uint8_t out_value_buf[4];
352 buf_set_u32(out_value_buf, 0, 32, outvalue);
354 retval = adi_jtag_dp_scan(dap, instr, reg_addr, rnw,
355 out_value_buf, (uint8_t *)invalue, memaccess_tck, ack);
356 if (retval != ERROR_OK)
360 jtag_add_callback(arm_le_to_h_u32,
361 (jtag_callback_data_t) invalue);
366 static int adi_jtag_finish_read(struct adiv5_dap *dap)
368 int retval = ERROR_OK;
370 if (dap->last_read != NULL) {
371 retval = adi_jtag_dp_scan_u32(dap, JTAG_DP_DPACC,
372 DP_RDBUFF, DPAP_READ, 0, dap->last_read, 0, NULL);
373 dap->last_read = NULL;
379 static int adi_jtag_scan_inout_check_u32(struct adiv5_dap *dap,
380 uint8_t instr, uint8_t reg_addr, uint8_t rnw,
381 uint32_t outvalue, uint32_t *invalue, uint32_t memaccess_tck)
385 /* Issue the read or write */
386 retval = adi_jtag_dp_scan_u32(dap, instr, reg_addr,
387 rnw, outvalue, NULL, memaccess_tck, NULL);
388 if (retval != ERROR_OK)
391 /* For reads, collect posted value; RDBUFF has no other effect.
392 * Assumes read gets acked with OK/FAULT, and CTRL_STAT says "OK".
394 if ((rnw == DPAP_READ) && (invalue != NULL)) {
395 retval = adi_jtag_dp_scan_u32(dap, JTAG_DP_DPACC,
396 DP_RDBUFF, DPAP_READ, 0, invalue, 0, NULL);
397 if (retval != ERROR_OK)
401 return jtag_execute_queue();
404 static int jtagdp_overrun_check(struct adiv5_dap *dap)
407 struct dap_cmd *el, *tmp, *prev = NULL;
410 LIST_HEAD(replay_list);
412 /* make sure all queued transactions are complete */
413 retval = jtag_execute_queue();
414 if (retval != ERROR_OK)
417 /* skip all completed transactions up to the first WAIT */
418 list_for_each_entry(el, &dap->cmd_journal, lh) {
419 if (el->ack == JTAG_ACK_OK_FAULT) {
420 log_dap_cmd("LOG", el);
421 } else if (el->ack == JTAG_ACK_WAIT) {
425 LOG_ERROR("Invalid ACK (%1x) in DAP response", el->ack);
426 log_dap_cmd("ERR", el);
427 retval = ERROR_JTAG_DEVICE_ERROR;
433 * If we found a stalled transaction and a previous transaction
434 * exists, check if it's a READ access.
436 if (found_wait && el != list_first_entry(&dap->cmd_journal, struct dap_cmd, lh)) {
437 prev = list_entry(el->lh.prev, struct dap_cmd, lh);
438 if (prev->rnw == DPAP_READ) {
439 log_dap_cmd("PND", prev);
440 /* search for the next OK transaction, it contains
441 * the result of the previous READ */
443 list_for_each_entry_from(tmp, &dap->cmd_journal, lh) {
444 if (tmp->ack == JTAG_ACK_OK_FAULT) {
445 /* recover the read value */
446 log_dap_cmd("FND", tmp);
447 if (el->invalue != el->invalue_buf) {
448 uint32_t invalue = le_to_h_u32(tmp->invalue);
449 memcpy(el->invalue, &invalue, sizeof(uint32_t));
457 log_dap_cmd("LST", el);
460 * At this point we're sure that no previous
461 * transaction completed and the DAP/AP is still
462 * in busy state. We know that the next "OK" scan
463 * will return the READ result we need to recover.
464 * To complete the READ, we just keep polling RDBUFF
465 * until the WAIT condition clears
467 tmp = dap_cmd_new(dap, JTAG_DP_DPACC,
468 DP_RDBUFF, DPAP_READ, NULL, NULL, 0);
470 retval = ERROR_JTAG_DEVICE_ERROR;
473 /* synchronously retry the command until it succeeds */
474 time_now = timeval_ms();
476 retval = adi_jtag_dp_scan_cmd_sync(dap, tmp, NULL);
477 if (retval != ERROR_OK)
479 if (tmp->ack == JTAG_ACK_OK_FAULT) {
480 log_dap_cmd("FND", tmp);
481 if (el->invalue != el->invalue_buf) {
482 uint32_t invalue = le_to_h_u32(tmp->invalue);
483 memcpy(el->invalue, &invalue, sizeof(uint32_t));
487 if (tmp->ack != JTAG_ACK_WAIT) {
488 LOG_ERROR("Invalid ACK (%1x) in DAP response", tmp->ack);
489 log_dap_cmd("ERR", tmp);
490 retval = ERROR_JTAG_DEVICE_ERROR;
494 } while (timeval_ms() - time_now < 1000);
496 if (retval == ERROR_OK) {
497 /* timeout happened */
498 if (tmp->ack != JTAG_ACK_OK_FAULT) {
499 LOG_ERROR("Timeout during WAIT recovery");
500 dap->select = DP_SELECT_INVALID;
501 jtag_ap_q_abort(dap, NULL);
502 /* clear the sticky overrun condition */
503 adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
504 DP_CTRL_STAT, DPAP_WRITE,
505 dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
506 retval = ERROR_JTAG_DEVICE_ERROR;
510 /* we're done with this command, release it */
511 dap_cmd_release(dap, tmp);
513 if (retval != ERROR_OK)
517 /* make el->invalue point to the default invalue
518 * so that we can safely retry it without clobbering
519 * the result we just recovered */
520 el->invalue = el->invalue_buf;
524 /* move all remaining transactions over to the replay list */
525 list_for_each_entry_safe_from(el, tmp, &dap->cmd_journal, lh) {
526 log_dap_cmd("REP", el);
527 list_move_tail(&el->lh, &replay_list);
530 /* we're done with the journal, flush it */
531 flush_journal(dap, &dap->cmd_journal);
533 /* check for overrun condition in the last batch of transactions */
535 LOG_INFO("DAP transaction stalled (WAIT) - slowing down");
536 /* clear the sticky overrun condition */
537 retval = adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
538 DP_CTRL_STAT, DPAP_WRITE,
539 dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
540 if (retval != ERROR_OK)
543 /* restore SELECT register first */
544 if (!list_empty(&replay_list)) {
545 el = list_first_entry(&replay_list, struct dap_cmd, lh);
546 tmp = dap_cmd_new(dap, JTAG_DP_DPACC,
547 DP_SELECT, DPAP_WRITE, (uint8_t *)&el->dp_select, NULL, 0);
549 retval = ERROR_JTAG_DEVICE_ERROR;
552 list_add(&tmp->lh, &replay_list);
554 dap->select = DP_SELECT_INVALID;
557 list_for_each_entry_safe(el, tmp, &replay_list, lh) {
558 time_now = timeval_ms();
560 retval = adi_jtag_dp_scan_cmd_sync(dap, el, NULL);
561 if (retval != ERROR_OK)
563 log_dap_cmd("REC", el);
564 if (el->ack == JTAG_ACK_OK_FAULT) {
565 if (el->invalue != el->invalue_buf) {
566 uint32_t invalue = le_to_h_u32(el->invalue);
567 memcpy(el->invalue, &invalue, sizeof(uint32_t));
571 if (el->ack != JTAG_ACK_WAIT) {
572 LOG_ERROR("Invalid ACK (%1x) in DAP response", el->ack);
573 log_dap_cmd("ERR", el);
574 retval = ERROR_JTAG_DEVICE_ERROR;
577 LOG_INFO("DAP transaction stalled during replay (WAIT) - resending");
578 /* clear the sticky overrun condition */
579 retval = adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
580 DP_CTRL_STAT, DPAP_WRITE,
581 dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
582 if (retval != ERROR_OK)
584 } while (timeval_ms() - time_now < 1000);
586 if (retval == ERROR_OK) {
587 if (el->ack != JTAG_ACK_OK_FAULT) {
588 LOG_ERROR("Timeout during WAIT recovery");
589 dap->select = DP_SELECT_INVALID;
590 jtag_ap_q_abort(dap, NULL);
591 /* clear the sticky overrun condition */
592 adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
593 DP_CTRL_STAT, DPAP_WRITE,
594 dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
595 retval = ERROR_JTAG_DEVICE_ERROR;
604 flush_journal(dap, &replay_list);
605 flush_journal(dap, &dap->cmd_journal);
609 static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
612 uint32_t ctrlstat, pwrmask;
614 /* too expensive to call keep_alive() here */
616 /* Post CTRL/STAT read; discard any previous posted read value
617 * but collect its ACK status.
619 retval = adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
620 DP_CTRL_STAT, DPAP_READ, 0, &ctrlstat, 0);
621 if (retval != ERROR_OK)
624 /* REVISIT also STICKYCMP, for pushed comparisons (nyet used) */
626 /* Check for STICKYERR */
627 if (ctrlstat & SSTICKYERR) {
628 LOG_DEBUG("jtag-dp: CTRL/STAT 0x%" PRIx32, ctrlstat);
629 /* Check power to debug regions */
630 pwrmask = CDBGPWRUPREQ | CDBGPWRUPACK | CSYSPWRUPREQ;
631 if (!dap->ignore_syspwrupack)
632 pwrmask |= CSYSPWRUPACK;
633 if ((ctrlstat & pwrmask) != pwrmask) {
634 LOG_ERROR("Debug regions are unpowered, an unexpected reset might have happened");
635 dap->do_reconnect = true;
638 if (ctrlstat & SSTICKYERR)
639 LOG_ERROR("JTAG-DP STICKY ERROR");
640 if (ctrlstat & SSTICKYORUN)
641 LOG_DEBUG("JTAG-DP STICKY OVERRUN");
643 /* Clear Sticky Error Bits */
644 retval = adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
645 DP_CTRL_STAT, DPAP_WRITE,
646 dap->dp_ctrl_stat | SSTICKYERR, NULL, 0);
647 if (retval != ERROR_OK)
650 retval = ERROR_JTAG_DEVICE_ERROR;
654 flush_journal(dap, &dap->cmd_journal);
658 /*--------------------------------------------------------------------------*/
660 static int jtag_connect(struct adiv5_dap *dap)
662 dap->do_reconnect = false;
663 return dap_dp_init(dap);
666 static int jtag_check_reconnect(struct adiv5_dap *dap)
668 if (dap->do_reconnect)
669 return jtag_connect(dap);
674 static int jtag_send_sequence(struct adiv5_dap *dap, enum swd_special_seq seq)
680 retval = jtag_add_tms_seq(swd_seq_jtag_to_swd_len,
681 swd_seq_jtag_to_swd, TAP_INVALID);
684 retval = jtag_add_tms_seq(swd_seq_swd_to_jtag_len,
685 swd_seq_swd_to_jtag, TAP_RESET);
688 LOG_ERROR("Sequence %d not supported", seq);
691 if (retval == ERROR_OK)
692 retval = jtag_execute_queue();
696 static int jtag_dp_q_read(struct adiv5_dap *dap, unsigned reg,
699 int retval = jtag_limit_queue_size(dap);
700 if (retval != ERROR_OK)
703 retval = adi_jtag_dp_scan_u32(dap, JTAG_DP_DPACC, reg,
704 DPAP_READ, 0, dap->last_read, 0, NULL);
705 dap->last_read = data;
709 static int jtag_dp_q_write(struct adiv5_dap *dap, unsigned reg,
712 int retval = jtag_limit_queue_size(dap);
713 if (retval != ERROR_OK)
716 retval = adi_jtag_dp_scan_u32(dap, JTAG_DP_DPACC,
717 reg, DPAP_WRITE, data, dap->last_read, 0, NULL);
718 dap->last_read = NULL;
722 /** Select the AP register bank matching bits 7:4 of reg. */
723 static int jtag_ap_q_bankselect(struct adiv5_ap *ap, unsigned reg)
725 struct adiv5_dap *dap = ap->dap;
726 uint32_t sel = ((uint32_t)ap->ap_num << 24) | (reg & 0x000000F0);
728 if (sel == dap->select)
733 return jtag_dp_q_write(dap, DP_SELECT, sel);
736 static int jtag_ap_q_read(struct adiv5_ap *ap, unsigned reg,
739 int retval = jtag_limit_queue_size(ap->dap);
740 if (retval != ERROR_OK)
743 retval = jtag_check_reconnect(ap->dap);
744 if (retval != ERROR_OK)
747 retval = jtag_ap_q_bankselect(ap, reg);
748 if (retval != ERROR_OK)
751 retval = adi_jtag_dp_scan_u32(ap->dap, JTAG_DP_APACC, reg,
752 DPAP_READ, 0, ap->dap->last_read, ap->memaccess_tck, NULL);
753 ap->dap->last_read = data;
758 static int jtag_ap_q_write(struct adiv5_ap *ap, unsigned reg,
761 int retval = jtag_limit_queue_size(ap->dap);
762 if (retval != ERROR_OK)
765 retval = jtag_check_reconnect(ap->dap);
766 if (retval != ERROR_OK)
769 retval = jtag_ap_q_bankselect(ap, reg);
770 if (retval != ERROR_OK)
773 retval = adi_jtag_dp_scan_u32(ap->dap, JTAG_DP_APACC, reg,
774 DPAP_WRITE, data, ap->dap->last_read, ap->memaccess_tck, NULL);
775 ap->dap->last_read = NULL;
779 static int jtag_ap_q_abort(struct adiv5_dap *dap, uint8_t *ack)
781 /* for JTAG, this is the only valid ABORT register operation */
782 int retval = adi_jtag_dp_scan_u32(dap, JTAG_DP_ABORT,
783 0, DPAP_WRITE, 1, NULL, 0, NULL);
784 if (retval != ERROR_OK)
787 return jtag_execute_queue();
790 static int jtag_dp_run(struct adiv5_dap *dap)
793 int retval2 = ERROR_OK;
795 retval = adi_jtag_finish_read(dap);
796 if (retval != ERROR_OK)
798 retval2 = jtagdp_overrun_check(dap);
799 retval = jtagdp_transaction_endcheck(dap);
802 return (retval2 != ERROR_OK) ? retval2 : retval;
805 static int jtag_dp_sync(struct adiv5_dap *dap)
807 return jtagdp_overrun_check(dap);
810 /* FIXME don't export ... just initialize as
813 const struct dap_ops jtag_dp_ops = {
814 .connect = jtag_connect,
815 .send_sequence = jtag_send_sequence,
816 .queue_dp_read = jtag_dp_q_read,
817 .queue_dp_write = jtag_dp_q_write,
818 .queue_ap_read = jtag_ap_q_read,
819 .queue_ap_write = jtag_ap_q_write,
820 .queue_ap_abort = jtag_ap_q_abort,
822 .sync = jtag_dp_sync,