dptx: Allow introduction of AUX and sideband message latency delays.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
2ebd71bd56
commit
adc89fae61
3 changed files with 18 additions and 0 deletions
|
@ -1302,6 +1302,10 @@ void XDptx_WaitUs(XDptx *InstancePtr, u32 MicroSeconds)
|
|||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
|
||||
if (MicroSeconds == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(__MICROBLAZE__)
|
||||
if (InstancePtr->UserTimerWaitUs != NULL) {
|
||||
/* Use the timer handler specified by the user for better
|
||||
|
@ -2275,6 +2279,8 @@ static u32 XDptx_AuxCommon(XDptx *InstancePtr, u32 CmdType, u32 Address,
|
|||
Request.CmdCode = XDPTX_AUX_CMD_I2C_WRITE_MOT;
|
||||
}
|
||||
|
||||
XDptx_WaitUs(InstancePtr, InstancePtr->AuxDelayUs);
|
||||
|
||||
Status = XDptx_AuxRequest(InstancePtr, &Request);
|
||||
if (Status != XST_SUCCESS) {
|
||||
return Status;
|
||||
|
|
|
@ -725,6 +725,14 @@ typedef struct {
|
|||
devices when the driver
|
||||
is running in MST
|
||||
mode. */
|
||||
u32 AuxDelayUs; /**< Amount of latency in micro-
|
||||
seconds to use between
|
||||
AUX transactions. */
|
||||
u32 SbMsgDelayUs; /**< Amount of latency in micro-
|
||||
seconds to use between
|
||||
sideband messages for
|
||||
multi-stream transport
|
||||
(MST) mode. */
|
||||
XDptx_TimerHandler UserTimerWaitUs; /**< Custom user function for
|
||||
delay/sleep. */
|
||||
void *UserTimerPtr; /**< Pointer to a timer instance
|
||||
|
|
|
@ -2007,6 +2007,8 @@ static u32 XDptx_SendSbMsg(XDptx *InstancePtr, XDptx_SidebandMsg *Msg)
|
|||
XDptx_SidebandMsgBody *Body = &Msg->Body;
|
||||
u8 Index;
|
||||
|
||||
XDptx_WaitUs(InstancePtr, InstancePtr->SbMsgDelayUs);
|
||||
|
||||
/* Add the header to the sideband message transaction. */
|
||||
Msg->Header.MsgHeaderLength = 0;
|
||||
AuxData[Msg->Header.MsgHeaderLength++] =
|
||||
|
@ -2077,6 +2079,8 @@ static u32 XDptx_ReceiveSbMsg(XDptx *InstancePtr, XDptx_SidebandReply *SbReply)
|
|||
SbReply->Length = 0;
|
||||
|
||||
do {
|
||||
XDptx_WaitUs(InstancePtr, InstancePtr->SbMsgDelayUs);
|
||||
|
||||
/* Wait for a reply. */
|
||||
Status = XDptx_WaitSbReply(InstancePtr);
|
||||
if (Status != XST_SUCCESS) {
|
||||
|
|
Loading…
Add table
Reference in a new issue