diff options
author | mike brown <theshed@mikebrown.org.uk> | 2013-03-18 17:19:14 +0000 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-04-02 15:09:40 +0000 |
commit | 2a8a89edcba49051315f59cea05834b5b704ee61 (patch) | |
tree | 872d1ce489227be454283bddf8da07ef49cef165 /src/target/arm_adi_v5.h | |
parent | 0875e64ddb1cade43c7a56d8cc6e743364b65b58 (diff) |
arm_adi_v5: fix mem_ap_read_buf_u32() JTAG nastiness..
Moved JTAG code out of transport-neutral file (arm_adi_v5.c) into
transport specific file (adi_v5_jtag.c).
Added ap_block_read to dap_ops interface (arm_adi_v5.h) to support
the move.
Change-Id: I796d3984f138aad052b97c77ac9c12ffd1158f74
Signed-off-by: mike brown <mike@theshedworks.org.uk>
Reviewed-on: http://openocd.zylin.com/1277
Tested-by: jenkins
Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r-- | src/target/arm_adi_v5.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 7f1ebf5e..301402ec 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -216,6 +216,9 @@ struct dap_ops { /** AP register write. */ int (*queue_ap_write)(struct adiv5_dap *dap, unsigned reg, uint32_t data); + /** AP read block. */ + int (*queue_ap_read_block)(struct adiv5_dap *dap, unsigned reg, + uint32_t blocksize, uint8_t *buffer); /** AP operation abort. */ int (*queue_ap_abort)(struct adiv5_dap *dap, uint8_t *ack); @@ -322,6 +325,24 @@ static inline int dap_queue_ap_write(struct adiv5_dap *dap, } /** + * Queue an AP block read. + * + * @param dap The DAP used for reading. + * @param reg The number of the AP register being read. + * @param blocksize The number of the AP register being read. + * @param buffer Pointer saying where to store the data + * (in host endianness). + * + * @return ERROR_OK for success, else a fault code. + */ +static inline int dap_queue_ap_read_block(struct adiv5_dap *dap, + unsigned reg, unsigned blocksize, uint8_t *buffer) +{ + assert(dap->ops != NULL); + return dap->ops->queue_ap_read_block(dap, reg, blocksize, buffer); +} + +/** * Queue an AP abort operation. The current AP transaction is aborted, * including any update of the transaction counter. The AP is left in * an unknown state (so it must be re-initialized). For use only after |