dp: TX/RX core type should operate on the XDp structure pointer.
Rather than on the configuration structure pointer. This makes it cleaner and easier to use as this function is an API function. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
e394c31035
commit
7b382d036f
4 changed files with 13 additions and 13 deletions
|
@ -194,7 +194,7 @@ void XDp_CfgInitialize(XDp *InstancePtr, XDp_Config *ConfigPtr,
|
|||
|
||||
InstancePtr->Config.IsRx = ConfigPtr->IsRx;
|
||||
|
||||
if (XDp_CfgGetCoreType(ConfigPtr) == XDP_TX) {
|
||||
if (XDp_GetCoreType(InstancePtr) == XDP_TX) {
|
||||
/* Set the DisplayPort TX's voltage swing and pre-emphasis
|
||||
* levels to their defaults. */
|
||||
XDp_TxCfgTxVsOffset(InstancePtr, XDP_TX_VS_LEVEL_OFFSET);
|
||||
|
@ -234,7 +234,7 @@ u32 XDp_Initialize(XDp *InstancePtr)
|
|||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
|
||||
if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) {
|
||||
if (XDp_GetCoreType(InstancePtr) == XDP_TX) {
|
||||
Status = XDp_TxInitialize(InstancePtr);
|
||||
}
|
||||
else {
|
||||
|
@ -3044,7 +3044,7 @@ static u32 XDp_WaitPhyReady(XDp *InstancePtr, u32 Mask)
|
|||
u32 PhyStatus;
|
||||
u32 RegPhyStatus;
|
||||
|
||||
if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) {
|
||||
if (XDp_GetCoreType(InstancePtr) == XDP_TX) {
|
||||
RegPhyStatus = XDP_TX_PHY_STATUS;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -947,20 +947,20 @@ void XDp_RxSetUserPixelWidth(XDp *InstancePtr, u8 UserPixelWidth);
|
|||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This is function determines whether the DisplayPort core that the
|
||||
* configuration structure represents is a transmitter (TX) or a receiver (RX).
|
||||
* This is function determines whether the DisplayPort core, represented by the
|
||||
* XDp structure pointed to, is a transmitter (TX) or a receiver (RX).
|
||||
*
|
||||
* @param ConfigPtr is a pointer to the DisplayPort core's configuration
|
||||
* structure.
|
||||
* @param InstancePtr is a pointer to the XDp instance.
|
||||
*
|
||||
* @return XDP_RX if the configuration structure is for a core of type RX.
|
||||
* XDP_TX if the configuration structure is for a core of type TX.
|
||||
* @return XDP_RX if the core is of type RX.
|
||||
* XDP_TX if the core is of type TX.
|
||||
*
|
||||
* @note C-style signature:
|
||||
* u32 XDp_CfgGetCoreType(XDp_Config *ConfigPtr)
|
||||
* u32 XDp_GetCoreType(XDp *InstancePtr)
|
||||
*
|
||||
*******************************************************************************/
|
||||
#define XDp_CfgGetCoreType(ConfigPtr) ((ConfigPtr)->IsRx ? XDP_RX : XDP_TX)
|
||||
#define XDp_GetCoreType(InstancePtr) ((InstancePtr)->Config.IsRx \
|
||||
? XDP_RX : XDP_TX)
|
||||
|
||||
/******************************* Compatibility ********************************/
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ void XDp_InterruptHandler(XDp *InstancePtr)
|
|||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
|
||||
if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) {
|
||||
if (XDp_GetCoreType(InstancePtr) == XDP_TX) {
|
||||
XDp_TxInterruptHandler(InstancePtr);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -230,7 +230,7 @@ u32 XDp_SelfTest(XDp *InstancePtr)
|
|||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
|
||||
if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) {
|
||||
if (XDp_GetCoreType(InstancePtr) == XDP_TX) {
|
||||
Status = XDp_TxSelfTest(InstancePtr);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue