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 <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2014-10-31 10:00:30 -07:00 committed by Suneel Garapati
parent 0cd5afb0fd
commit bc8b86b940

View file

@ -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++) {