diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index ff1680b0d..201ed90aa 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -679,6 +679,11 @@ static int jtag_dp_run(struct adiv5_dap *dap) return (retval2 != ERROR_OK) ? retval2 : retval; } +static int jtag_dp_sync(struct adiv5_dap *dap) +{ + return jtagdp_overrun_check(dap); +} + /* FIXME don't export ... just initialize as * part of DAP setup */ @@ -689,6 +694,7 @@ const struct dap_ops jtag_dp_ops = { .queue_ap_write = jtag_ap_q_write, .queue_ap_abort = jtag_ap_q_abort, .run = jtag_dp_run, + .sync = jtag_dp_sync, }; diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 44d3962cd..f001d6a26 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -274,6 +274,10 @@ struct dap_ops { /** Executes all queued DAP operations. */ int (*run)(struct adiv5_dap *dap); + + /** Executes all queued DAP operations but doesn't check + * sticky error conditions */ + int (*sync)(struct adiv5_dap *dap); }; /* @@ -397,6 +401,14 @@ static inline int dap_run(struct adiv5_dap *dap) return dap->ops->run(dap); } +static inline int dap_sync(struct adiv5_dap *dap) +{ + assert(dap->ops != NULL); + if (dap->ops->sync) + return dap->ops->sync(dap); + return ERROR_OK; +} + static inline int dap_dp_read_atomic(struct adiv5_dap *dap, unsigned reg, uint32_t *value) {