PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
which is used to enable recovery function from USB Drivers.\r
\r
-Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution. The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
return Data;\r
}\r
\r
-/**\r
- Read XHCI door bell register.\r
-\r
- @param Xhc The XHCI device.\r
- @param Offset The offset of the door bell register.\r
-\r
- @return The register content read\r
\r
-**/\r
-UINT32\r
-XhcPeiReadDoorBellReg (\r
- IN PEI_XHC_DEV *Xhc,\r
- IN UINT32 Offset\r
- )\r
-{\r
- UINT32 Data;\r
-\r
- ASSERT (Xhc->DBOff != 0);\r
-\r
- Data = MmioRead32 (Xhc->UsbHostControllerBaseAddress + Xhc->DBOff + Offset);\r
-\r
- return Data;\r
-}\r
\r
/**\r
Write the data to the XHCI door bell register.\r
DEBUG ((EFI_D_INFO, "XhcPeiGetRootHubPortStatus: Port: %x State: %x\n", PortNumber, State));\r
\r
//\r
- // According to XHCI 1.0 spec, bit 10~13 of the root port status register identifies the speed of the attached device.\r
+ // According to XHCI 1.1 spec November 2017,\r
+ // bit 10~13 of the root port status register identifies the speed of the attached device.\r
//\r
switch ((State & XHC_PORTSC_PS) >> 10) {\r
case 2:\r
break;\r
\r
case 4:\r
+ case 5:\r
PortStatus->PortStatus |= USB_PORT_STAT_SUPER_SPEED;\r
break;\r
\r
\r
XhcPeiHaltHC (Xhc, XHC_GENERIC_TIMEOUT);\r
\r
+ XhcPeiFreeSched (Xhc);\r
+\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
- IoMmuInit ();\r
-\r
Status = PeiServicesLocatePpi (\r
&gPeiUsbControllerPpiGuid,\r
0,\r
return EFI_UNSUPPORTED;\r
}\r
\r
+ IoMmuInit ();\r
+\r
Index = 0;\r
while (TRUE) {\r
Status = UsbControllerPpi->GetUsbController (\r