adi_v5_jtag: implement DAP WAIT support
ADIv5 specifies that DP and AP accesses may generate a WAIT response when the hardware is not able to complete a request for various reasons in time before the next request is sent. Currently, the software treats a WAIT response as a fatal error and aborts operation on the DAP. This patch implements WAIT handling by keeping a journal of all outstanding and completed accesses, including their response status. At certain times (when dap_run() is called), the journal is inspected for WAIT responses and all discarded accesses are replayed to complete them. Special care is taken to not re-execute already successfully completed operations. Change-Id: I2790070388cf1ab2e8c9a042d74eb3ef776aa583 Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-on: http://openocd.zylin.com/3166 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
committed by
Paul Fertser
parent
ae8cdc139e
commit
a185eaad9d
@@ -76,6 +76,7 @@
|
||||
#include "arm.h"
|
||||
#include "arm_adi_v5.h"
|
||||
#include <helper/time_support.h>
|
||||
#include <helper/list.h>
|
||||
|
||||
/* ARM ADI Specification requires at least 10 bits used for TAR autoincrement */
|
||||
|
||||
@@ -586,6 +587,7 @@ struct adiv5_dap *dap_init(void)
|
||||
/* Number of bits for tar autoincrement, impl. dep. at least 10 */
|
||||
dap->ap[i].tar_autoincr_block = (1<<10);
|
||||
}
|
||||
INIT_LIST_HEAD(&dap->cmd_journal);
|
||||
return dap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user