/** @file\r
Debug Port Library implementation based on usb3 debug port.\r
\r
- Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
Write the data to the XHCI debug register.\r
\r
@param Handle Debug port handle.\r
- @param Offset The offset of the runtime register.\r
+ @param Offset The offset of the debug register.\r
@param Data The data to write.\r
\r
**/\r
VOID\r
XhcWriteDebugReg (\r
IN USB3_DEBUG_PORT_HANDLE *Handle,\r
- IN UINT32 Offset,\r
- IN UINT32 Data\r
+ IN UINT32 Offset,\r
+ IN UINT32 Data\r
)\r
{\r
EFI_PHYSICAL_ADDRESS DebugCapabilityBase;\r
UINT32\r
XhcReadDebugReg (\r
IN USB3_DEBUG_PORT_HANDLE *Handle,\r
- IN UINT32 Offset\r
+ IN UINT32 Offset\r
)\r
{\r
UINT32 Data;\r
}\r
\r
/**\r
- Set one bit of the runtime register while keeping other bits.\r
+ Set one bit of the debug register while keeping other bits.\r
\r
@param Handle Debug port handle.\r
- @param Offset The offset of the runtime register.\r
+ @param Offset The offset of the debug register.\r
@param Bit The bit mask of the register to set.\r
\r
**/\r
VOID\r
XhcSetDebugRegBit (\r
- IN USB3_DEBUG_PORT_HANDLE *Handle,\r
+ IN USB3_DEBUG_PORT_HANDLE *Handle,\r
IN UINT32 Offset,\r
IN UINT32 Bit\r
)\r
\r
@param Handle Debug port handle.\r
\r
- @retval RETURN_UNSUPPORTED The usb host controller does not supported usb debug port capability.\r
+ @retval RETURN_UNSUPPORTED The usb host controller does not support usb debug port capability.\r
@retval RETURN_SUCCESS Get bar and offset successfully.\r
\r
**/\r
@param Handle Debug port handle.\r
@param Buffer Pointer to the data buffer to store the data read from the debug device.\r
@param NumberOfBytes Number of bytes which will be read.\r
- @param Timeout Timeout value for reading from debug device. It unit is Microsecond.\r
+ @param Timeout Timeout value for reading from debug device. Its unit is Microsecond.\r
\r
@retval 0 Read data failed, no data is to be read.\r
@retval >0 Actual number of bytes read from debug device.\r
\r
@retval 0 NumberOfBytes is 0.\r
@retval >0 The number of bytes written to the debug device.\r
- If this value is less than NumberOfBytes, then the read operation failed.\r
+ If this value is less than NumberOfBytes, then the write operation failed.\r
\r
**/\r
UINTN\r
UINTN Sent;\r
UINTN Total;\r
EFI_PHYSICAL_ADDRESS XhciMmioBase;\r
- UINTN Index;\r
\r
if (NumberOfBytes == 0 || Buffer == NULL) {\r
return 0;\r
//\r
DebugPortPollBuffer (Handle);\r
\r
- Index = 0;\r
while ((Total < NumberOfBytes)) {\r
if (NumberOfBytes - Total > USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE) {\r
Sent = USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE;\r
@param Handle Debug port handle.\r
\r
@retval TRUE Data is waiting to be read from the debug device.\r
- @retval FALSE There is no data waiting to be read from the serial device.\r
+ @retval FALSE There is no data waiting to be read from the debug device.\r
\r
**/\r
BOOLEAN\r