From bc8b86b940e75a9469a11d61244edd8219cdf14b Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Fri, 31 Oct 2014 10:00:30 -0700 Subject: [PATCH] dptx: Optimize read/write GUID functions to use new remote reads/writes. The remote read/write functions serve as a wrapper in case the target RX device is directly connected to the TX (link count total is equal to 1). These functions may be called instead of the read/write GUID functions doing the same thing. Signed-off-by: Andrei-Liviu Simion --- .../drivers/dptx/src/xdptx_mst.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/dptx/src/xdptx_mst.c b/XilinxProcessorIPLib/drivers/dptx/src/xdptx_mst.c index 32dd8acb..0d7d90df 100644 --- a/XilinxProcessorIPLib/drivers/dptx/src/xdptx_mst.c +++ b/XilinxProcessorIPLib/drivers/dptx/src/xdptx_mst.c @@ -1724,13 +1724,8 @@ void XDptx_WriteGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, 0xFF; } - if (LinkCountTotal == 1) { - XDptx_AuxWrite(InstancePtr, XDPTX_DPCD_GUID, 16, AuxData); - } - else { - XDptx_SendSbMsgRemoteDpcdWrite(InstancePtr, LinkCountTotal, - RelativeAddress, XDPTX_DPCD_GUID, 16, AuxData); - } + XDptx_RemoteDpcdWrite(InstancePtr, LinkCountTotal, RelativeAddress, + XDPTX_DPCD_GUID, 16, AuxData); } /******************************************************************************/ @@ -1764,13 +1759,8 @@ void XDptx_GetGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, Xil_AssertVoid((RelativeAddress != NULL) || (LinkCountTotal == 1)); Xil_AssertVoid(Guid != NULL); - if (LinkCountTotal == 1) { - XDptx_AuxRead(InstancePtr, XDPTX_DPCD_GUID, 16, Data); - } - else { - XDptx_SendSbMsgRemoteDpcdRead(InstancePtr, LinkCountTotal, - RelativeAddress, XDPTX_DPCD_GUID, 16, Data); - } + XDptx_RemoteDpcdRead(InstancePtr, LinkCountTotal, RelativeAddress, + XDPTX_DPCD_GUID, 16, Data); memset(Guid, 0, 16); for (Index = 0; Index < 16; Index++) {