dp: tx: Always ensure that any pending AUX transactions have completed.
Prior to initiating a new AUX transaction, always ensure that any pending transactions have completed. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
2cb307c7d5
commit
78cccda094
1 changed files with 14 additions and 0 deletions
|
@ -2967,6 +2967,20 @@ static u32 XDp_TxAuxRequestSend(XDp *InstancePtr, XDp_AuxTransaction *Request)
|
|||
u32 Status;
|
||||
u8 Index;
|
||||
|
||||
/* Ensure that any pending AUX transactions have completed. */
|
||||
TimeoutCount = 0;
|
||||
do {
|
||||
Status = XDp_ReadReg(InstancePtr->Config.BaseAddr,
|
||||
XDP_TX_REPLY_STATUS);
|
||||
|
||||
XDp_WaitUs(InstancePtr, 20);
|
||||
TimeoutCount++;
|
||||
if (TimeoutCount >= XDP_AUX_MAX_TIMEOUT_COUNT) {
|
||||
return XST_ERROR_COUNT_MAX;
|
||||
}
|
||||
} while ((Status & XDP_TX_REPLY_STATUS_REQUEST_IN_PROGRESS_MASK) &&
|
||||
(Status & XDP_TX_REPLY_STATUS_REPLY_IN_PROGRESS_MASK));
|
||||
|
||||
/* Set the address for the request. */
|
||||
XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_TX_AUX_ADDRESS,
|
||||
Request->Address);
|
||||
|
|
Loading…
Add table
Reference in a new issue