464f7005bb
On JTAG, all reads are pipelined. If you read a register, the result is not delivered inside the request that issued the read, it is delivered in the following request. The current code therefore issues a scan of the RDBUFF register after each read. This adds a superfluous transaction after each read. This patch follows a strategy similar to what SWD already implements. It also leverages that all JTAG reads are pipelined, i.e. the result will be clocked out in the next JTAG data phase, no matter if it's READ or WRITE. Therefore it's never necessary to explicitly read RDBUFF other than for the very last READ before a dap_run(). Change-Id: Ie40b1fef3203f0cdcb503f40dcbd2a68b0f9776c Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-on: http://openocd.zylin.com/3167 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>