summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
index 2ac8d7bae3..6fef61e565 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c
@@ -1,7 +1,7 @@
/** @file
Common Libarary for PEI USB
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -197,68 +197,6 @@ PeiUsbSetConfiguration (
}
/**
- Clear Endpoint Halt.
-
- @param PeiServices General-purpose services that are available to every PEIM.
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
- @param EndpointAddress The endpoint address.
-
- @retval EFI_SUCCESS Endpoint halt is cleared successfully.
- @retval EFI_DEVICE_ERROR Cannot clear the endpoint halt status due to a hardware error.
- @retval Others Other failure occurs.
-
-**/
-EFI_STATUS
-PeiUsbClearEndpointHalt (
- IN EFI_PEI_SERVICES **PeiServices,
- IN PEI_USB_IO_PPI *UsbIoPpi,
- IN UINT8 EndpointAddress
- )
-{
- EFI_STATUS Status;
- PEI_USB_DEVICE *PeiUsbDev;
- EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDescriptor;
- UINT8 EndpointIndex;
-
- EndpointIndex = 0;
- PeiUsbDev = PEI_USB_DEVICE_FROM_THIS (UsbIoPpi);
-
- while (EndpointIndex < MAX_ENDPOINT) {
- Status = UsbIoPpi->UsbGetEndpointDescriptor (PeiServices, UsbIoPpi, EndpointIndex, &EndpointDescriptor);
- if (EFI_ERROR (Status)) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (EndpointDescriptor->EndpointAddress == EndpointAddress) {
- break;
- }
-
- EndpointIndex++;
- }
-
- if (EndpointIndex == MAX_ENDPOINT) {
- return EFI_INVALID_PARAMETER;
- }
-
- Status = PeiUsbClearDeviceFeature (
- PeiServices,
- UsbIoPpi,
- EfiUsbEndpoint,
- EfiUsbEndpointHalt,
- EndpointAddress
- );
-
- //
- // set data toggle to zero.
- //
- if ((PeiUsbDev->DataToggle & (1 << EndpointIndex)) != 0) {
- PeiUsbDev->DataToggle = (UINT8) (PeiUsbDev->DataToggle ^ (1 << EndpointIndex));
- }
-
- return Status;
-}
-
-/**
Judge if the port is connected with a usb device or not.
@param PortStatus The usb port status gotten.