From 7c48fa85e0fce6a5588d36739d70b6dd48334162 Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Mon, 18 May 2015 19:16:27 -0700 Subject: [PATCH] dp: rx: mst: Added ability to set the DPCD for each port. Signed-off-by: Andrei-Liviu Simion --- XilinxProcessorIPLib/drivers/dp/src/xdp.h | 2 ++ XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.h b/XilinxProcessorIPLib/drivers/dp/src/xdp.h index 21234d0b..07d0e526 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.h @@ -1087,6 +1087,8 @@ XDp_RxIicMapEntry *XDp_RxGetIicMapEntry(XDp *InstancePtr, u8 PortNum, u8 IicAddress); u32 XDp_RxSetIicMapEntry(XDp *InstancePtr, u8 PortNum, u8 IicAddress, u8 ReadNumBytes, u8 *ReadData); +void XDp_RxSetDpcdMap(XDp *InstancePtr, u8 PortNum, u32 StartAddr, u32 NumBytes, + u8 *DpcdMap); void XDp_RxMstExposePort(XDp *InstancePtr, u8 PortNum, u8 Expose); void XDp_RxMstSetPort(XDp *InstancePtr, u8 PortNum, XDp_SbMsgLinkAddressReplyPortDetail *PortDetails); diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c index 88e3627f..54f01f4a 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c @@ -2463,6 +2463,36 @@ u32 XDp_RxSetIicMapEntry(XDp *InstancePtr, u8 PortNum, u8 IicAddress, return XST_SUCCESS; } +/******************************************************************************/ +/** + * This function specified the DPCD address space for a given port. The user + * provides a pointer to the data to be used. When an upstream device issues a + * REMOTE_DPCD_READ sideband message, the contents of this DPCD structure will + * be used as the reply's data. + * + * @param InstancePtr is a pointer to the XDp instance. + * @param PortNum is the port number for which to set the DPCD. + * @param StartAddr is the starting address for which to define the DPCD. + * @param NumBytes is the total number of bytes defined by the DPCD. + * @param DpcdMap is a pointer to a user-defined data structure that will + * be used as read data when an upstream device issues a DPCD read. + * + * @return None. + * + * @note None. + * +*******************************************************************************/ +void XDp_RxSetDpcdMap(XDp *InstancePtr, u8 PortNum, u32 StartAddr, u32 NumBytes, + u8 *DpcdMap) +{ + InstancePtr->RxInstance.Topology.Ports[PortNum].DpcdMap.DataPtr = + DpcdMap; + InstancePtr->RxInstance.Topology.Ports[PortNum].DpcdMap.NumBytes = + NumBytes; + InstancePtr->RxInstance.Topology.Ports[PortNum].DpcdMap.StartAddr = + StartAddr; +} + /******************************************************************************/ /** * This function allows the user to select which ports will be exposed when