From 9ba2fb9a305e9a638b4ae832c561df9ac4ec7d61 Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Wed, 15 Apr 2015 18:17:31 -0700 Subject: [PATCH] dp: rx: mst: Set number of ports in link address struct when exposing a port. Previously, the number of ports was only being set when setting an input port. If there are multiple input ports, the number of ports wasn't being accurately reflected. The user application was required to update the number of ports when setting a downstream port. This is now done within the driver. Signed-off-by: Andrei-Liviu Simion --- XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c index ad1957c3..328279e5 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c @@ -2410,6 +2410,9 @@ void XDp_RxMstExposePort(XDp *InstancePtr, u8 PortNum, u8 Expose) else if (InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts) { InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts--; } + + XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_RX_SINK_COUNT, + InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts); } /******************************************************************************/ @@ -2500,11 +2503,6 @@ void XDp_RxMstSetInputPort(XDp *InstancePtr, u8 PortNum, Branch->Guid[3] = PortOverride->Guid[3]; } - /* Make sure that the branch device is accounted for. */ - if (InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts == 0) { - InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts = 1; - } - XDp_RxMstExposePort(InstancePtr, PortNum, 1); }