dp: Reordered the listing of initialization functions.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
c80bd4b59d
commit
3736bcbce0
3 changed files with 123 additions and 123 deletions
|
@ -62,6 +62,61 @@ static u32 XDprx_WaitPhyReady(XDprx *InstancePtr, u8 Mask);
|
|||
|
||||
/**************************** Function Definitions ****************************/
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function retrieves the configuration for this DisplayPort RX instance
|
||||
* and fills in the InstancePtr->Config structure.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XDprx instance.
|
||||
* @param ConfigPtr is a pointer to the configuration structure that will
|
||||
* be used to copy the settings from.
|
||||
* @param EffectiveAddr is the device base address in the virtual memory
|
||||
* space. If the address translation is not used, then the physical
|
||||
* address is passed.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Unexpected errors may occur if the address mapping is changed
|
||||
* after this function is invoked.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void XDprx_CfgInitialize(XDprx *InstancePtr, XDp_Config *ConfigPtr,
|
||||
u32 EffectiveAddr)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(ConfigPtr != NULL);
|
||||
Xil_AssertVoid(EffectiveAddr != 0x0);
|
||||
|
||||
InstancePtr->IsReady = 0;
|
||||
|
||||
InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;
|
||||
InstancePtr->Config.BaseAddr = EffectiveAddr;
|
||||
InstancePtr->Config.SAxiClkHz = ConfigPtr->SAxiClkHz;
|
||||
|
||||
InstancePtr->Config.MaxLaneCount = ConfigPtr->MaxLaneCount;
|
||||
InstancePtr->Config.MaxLinkRate = ConfigPtr->MaxLinkRate;
|
||||
|
||||
InstancePtr->Config.MaxBitsPerColor = ConfigPtr->MaxBitsPerColor;
|
||||
InstancePtr->Config.QuadPixelEn = ConfigPtr->QuadPixelEn;
|
||||
InstancePtr->Config.DualPixelEn = ConfigPtr->DualPixelEn;
|
||||
InstancePtr->Config.YCrCbEn = ConfigPtr->YCrCbEn;
|
||||
InstancePtr->Config.YOnlyEn = ConfigPtr->YOnlyEn;
|
||||
InstancePtr->Config.PayloadDataWidth = ConfigPtr->PayloadDataWidth;
|
||||
|
||||
InstancePtr->Config.SecondaryChEn = ConfigPtr->SecondaryChEn;
|
||||
InstancePtr->Config.NumAudioChs = ConfigPtr->NumAudioChs;
|
||||
|
||||
InstancePtr->Config.MstSupport = ConfigPtr->MstSupport;
|
||||
InstancePtr->Config.NumMstStreams = ConfigPtr->NumMstStreams;
|
||||
|
||||
InstancePtr->Config.DpProtocol = ConfigPtr->DpProtocol;
|
||||
|
||||
InstancePtr->Config.IsRx = ConfigPtr->IsRx;
|
||||
|
||||
InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function prepares the DisplayPort RX core for use.
|
||||
|
@ -134,61 +189,6 @@ u32 XDprx_InitializeRx(XDprx *InstancePtr)
|
|||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function retrieves the configuration for this DisplayPort RX instance
|
||||
* and fills in the InstancePtr->Config structure.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XDprx instance.
|
||||
* @param ConfigPtr is a pointer to the configuration structure that will
|
||||
* be used to copy the settings from.
|
||||
* @param EffectiveAddr is the device base address in the virtual memory
|
||||
* space. If the address translation is not used, then the physical
|
||||
* address is passed.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Unexpected errors may occur if the address mapping is changed
|
||||
* after this function is invoked.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void XDprx_CfgInitialize(XDprx *InstancePtr, XDp_Config *ConfigPtr,
|
||||
u32 EffectiveAddr)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(ConfigPtr != NULL);
|
||||
Xil_AssertVoid(EffectiveAddr != 0x0);
|
||||
|
||||
InstancePtr->IsReady = 0;
|
||||
|
||||
InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;
|
||||
InstancePtr->Config.BaseAddr = EffectiveAddr;
|
||||
InstancePtr->Config.SAxiClkHz = ConfigPtr->SAxiClkHz;
|
||||
|
||||
InstancePtr->Config.MaxLaneCount = ConfigPtr->MaxLaneCount;
|
||||
InstancePtr->Config.MaxLinkRate = ConfigPtr->MaxLinkRate;
|
||||
|
||||
InstancePtr->Config.MaxBitsPerColor = ConfigPtr->MaxBitsPerColor;
|
||||
InstancePtr->Config.QuadPixelEn = ConfigPtr->QuadPixelEn;
|
||||
InstancePtr->Config.DualPixelEn = ConfigPtr->DualPixelEn;
|
||||
InstancePtr->Config.YCrCbEn = ConfigPtr->YCrCbEn;
|
||||
InstancePtr->Config.YOnlyEn = ConfigPtr->YOnlyEn;
|
||||
InstancePtr->Config.PayloadDataWidth = ConfigPtr->PayloadDataWidth;
|
||||
|
||||
InstancePtr->Config.SecondaryChEn = ConfigPtr->SecondaryChEn;
|
||||
InstancePtr->Config.NumAudioChs = ConfigPtr->NumAudioChs;
|
||||
|
||||
InstancePtr->Config.MstSupport = ConfigPtr->MstSupport;
|
||||
InstancePtr->Config.NumMstStreams = ConfigPtr->NumMstStreams;
|
||||
|
||||
InstancePtr->Config.DpProtocol = ConfigPtr->DpProtocol;
|
||||
|
||||
InstancePtr->Config.IsRx = ConfigPtr->IsRx;
|
||||
|
||||
InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
|
||||
}
|
||||
|
||||
void XDprx_DtgEn(XDprx *InstancePtr)
|
||||
{
|
||||
XDprx_WriteReg(InstancePtr->Config.BaseAddr, XDPRX_SOFT_RESET, 0x01);
|
||||
|
|
|
@ -145,6 +145,73 @@ static u32 XDptx_WaitPhyReady(XDptx *InstancePtr);
|
|||
|
||||
/**************************** Function Definitions ****************************/
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function retrieves the configuration for this DisplayPort TX instance
|
||||
* and fills in the InstancePtr->Config structure.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XDptx instance.
|
||||
* @param ConfigPtr is a pointer to the configuration structure that will
|
||||
* be used to copy the settings from.
|
||||
* @param EffectiveAddr is the device base address in the virtual memory
|
||||
* space. If the address translation is not used, then the physical
|
||||
* address is passed.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Unexpected errors may occur if the address mapping is changed
|
||||
* after this function is invoked.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void XDptx_CfgInitialize(XDptx *InstancePtr, XDp_Config *ConfigPtr,
|
||||
u32 EffectiveAddr)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(ConfigPtr != NULL);
|
||||
Xil_AssertVoid(EffectiveAddr != 0x0);
|
||||
|
||||
InstancePtr->IsReady = 0;
|
||||
|
||||
InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;
|
||||
InstancePtr->Config.BaseAddr = EffectiveAddr;
|
||||
InstancePtr->Config.SAxiClkHz = ConfigPtr->SAxiClkHz;
|
||||
|
||||
InstancePtr->Config.MaxLaneCount = ConfigPtr->MaxLaneCount;
|
||||
InstancePtr->Config.MaxLinkRate = ConfigPtr->MaxLinkRate;
|
||||
|
||||
InstancePtr->Config.MaxBitsPerColor = ConfigPtr->MaxBitsPerColor;
|
||||
InstancePtr->Config.QuadPixelEn = ConfigPtr->QuadPixelEn;
|
||||
InstancePtr->Config.DualPixelEn = ConfigPtr->DualPixelEn;
|
||||
InstancePtr->Config.YCrCbEn = ConfigPtr->YCrCbEn;
|
||||
InstancePtr->Config.YOnlyEn = ConfigPtr->YOnlyEn;
|
||||
InstancePtr->Config.PayloadDataWidth = ConfigPtr->PayloadDataWidth;
|
||||
|
||||
InstancePtr->Config.SecondaryChEn = ConfigPtr->SecondaryChEn;
|
||||
InstancePtr->Config.NumAudioChs = ConfigPtr->NumAudioChs;
|
||||
|
||||
InstancePtr->Config.MstSupport = ConfigPtr->MstSupport;
|
||||
InstancePtr->Config.NumMstStreams = ConfigPtr->NumMstStreams;
|
||||
|
||||
InstancePtr->Config.DpProtocol = ConfigPtr->DpProtocol;
|
||||
|
||||
InstancePtr->Config.IsRx = ConfigPtr->IsRx;
|
||||
|
||||
/* Set the DisplayPort TX's voltage swing and pre-emphasis levels to
|
||||
* their defaults. */
|
||||
XDptx_CfgTxVsOffset(InstancePtr, XDPTX_VS_LEVEL_OFFSET);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 0, XDPTX_VS_LEVEL_0);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 1, XDPTX_VS_LEVEL_1);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 2, XDPTX_VS_LEVEL_2);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 3, XDPTX_VS_LEVEL_3);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 0, XDPTX_PE_LEVEL_0);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 1, XDPTX_PE_LEVEL_1);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 2, XDPTX_PE_LEVEL_2);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 3, XDPTX_PE_LEVEL_3);
|
||||
|
||||
InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function prepares the DisplayPort TX core for use.
|
||||
|
@ -227,73 +294,6 @@ u32 XDptx_InitializeTx(XDptx *InstancePtr)
|
|||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function retrieves the configuration for this DisplayPort TX instance
|
||||
* and fills in the InstancePtr->Config structure.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XDptx instance.
|
||||
* @param ConfigPtr is a pointer to the configuration structure that will
|
||||
* be used to copy the settings from.
|
||||
* @param EffectiveAddr is the device base address in the virtual memory
|
||||
* space. If the address translation is not used, then the physical
|
||||
* address is passed.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note Unexpected errors may occur if the address mapping is changed
|
||||
* after this function is invoked.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void XDptx_CfgInitialize(XDptx *InstancePtr, XDp_Config *ConfigPtr,
|
||||
u32 EffectiveAddr)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(ConfigPtr != NULL);
|
||||
Xil_AssertVoid(EffectiveAddr != 0x0);
|
||||
|
||||
InstancePtr->IsReady = 0;
|
||||
|
||||
InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;
|
||||
InstancePtr->Config.BaseAddr = EffectiveAddr;
|
||||
InstancePtr->Config.SAxiClkHz = ConfigPtr->SAxiClkHz;
|
||||
|
||||
InstancePtr->Config.MaxLaneCount = ConfigPtr->MaxLaneCount;
|
||||
InstancePtr->Config.MaxLinkRate = ConfigPtr->MaxLinkRate;
|
||||
|
||||
InstancePtr->Config.MaxBitsPerColor = ConfigPtr->MaxBitsPerColor;
|
||||
InstancePtr->Config.QuadPixelEn = ConfigPtr->QuadPixelEn;
|
||||
InstancePtr->Config.DualPixelEn = ConfigPtr->DualPixelEn;
|
||||
InstancePtr->Config.YCrCbEn = ConfigPtr->YCrCbEn;
|
||||
InstancePtr->Config.YOnlyEn = ConfigPtr->YOnlyEn;
|
||||
InstancePtr->Config.PayloadDataWidth = ConfigPtr->PayloadDataWidth;
|
||||
|
||||
InstancePtr->Config.SecondaryChEn = ConfigPtr->SecondaryChEn;
|
||||
InstancePtr->Config.NumAudioChs = ConfigPtr->NumAudioChs;
|
||||
|
||||
InstancePtr->Config.MstSupport = ConfigPtr->MstSupport;
|
||||
InstancePtr->Config.NumMstStreams = ConfigPtr->NumMstStreams;
|
||||
|
||||
InstancePtr->Config.DpProtocol = ConfigPtr->DpProtocol;
|
||||
|
||||
InstancePtr->Config.IsRx = ConfigPtr->IsRx;
|
||||
|
||||
/* Set the DisplayPort TX's voltage swing and pre-emphasis levels to
|
||||
* their defaults. */
|
||||
XDptx_CfgTxVsOffset(InstancePtr, XDPTX_VS_LEVEL_OFFSET);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 0, XDPTX_VS_LEVEL_0);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 1, XDPTX_VS_LEVEL_1);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 2, XDPTX_VS_LEVEL_2);
|
||||
XDptx_CfgTxVsLevel(InstancePtr, 3, XDPTX_VS_LEVEL_3);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 0, XDPTX_PE_LEVEL_0);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 1, XDPTX_PE_LEVEL_1);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 2, XDPTX_PE_LEVEL_2);
|
||||
XDptx_CfgTxPeLevel(InstancePtr, 3, XDPTX_PE_LEVEL_3);
|
||||
|
||||
InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function retrieves the RX device's capabilities from the RX device's
|
||||
|
|
|
@ -567,9 +567,9 @@ typedef struct {
|
|||
/**************************** Function Prototypes *****************************/
|
||||
|
||||
/* xdptx.c: Setup and initialization functions. */
|
||||
u32 XDptx_InitializeTx(XDptx *InstancePtr);
|
||||
void XDptx_CfgInitialize(XDptx *InstancePtr, XDp_Config *ConfigPtr,
|
||||
u32 EffectiveAddr);
|
||||
u32 XDptx_InitializeTx(XDptx *InstancePtr);
|
||||
u32 XDptx_GetRxCapabilities(XDptx *InstancePtr);
|
||||
|
||||
/* xdptx.c: Link policy maker functions. */
|
||||
|
|
Loading…
Add table
Reference in a new issue