The functions that are never called have been removed.
They are PeiHubSetHubFeature,IsPortConnectChange and
PeiUsbClearDeviceFeature.
https://bugzilla.tianocore.org/show_bug.cgi?id=1062
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
);\r
}\r
\r
-/**\r
- Set specified feature to a given hub.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param Value New feature value.\r
-\r
- @retval EFI_SUCCESS Port feature is set successfully.\r
- @retval EFI_DEVICE_ERROR Cannot set the port feature due to a hardware error.\r
- @retval Others Other failure occurs.\r
-\r
-**/\r
-EFI_STATUS\r
-PeiHubSetHubFeature (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN UINT8 Value\r
- )\r
-{\r
- EFI_USB_DEVICE_REQUEST DeviceRequest;\r
\r
- ZeroMem (&DeviceRequest, sizeof (EFI_USB_DEVICE_REQUEST));\r
-\r
- //\r
- // Fill Device request packet\r
- //\r
- DeviceRequest.RequestType = USB_HUB_SET_HUB_FEATURE_REQ_TYPE;\r
- DeviceRequest.Request = USB_HUB_SET_HUB_FEATURE;\r
- DeviceRequest.Value = Value;\r
-\r
- return UsbIoPpi->UsbControlTransfer (\r
- PeiServices,\r
- UsbIoPpi,\r
- &DeviceRequest,\r
- EfiUsbNoData,\r
- PcdGet32 (PcdUsbTransferTimeoutValue),\r
- NULL,\r
- 0\r
- );\r
-}\r
\r
/**\r
Clear specified feature on a given hub.\r
IN UINT8 Value\r
);\r
\r
-/**\r
- Set specified feature to a given hub.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param Value New feature value.\r
-\r
- @retval EFI_SUCCESS Port feature is set successfully.\r
- @retval EFI_DEVICE_ERROR Cannot set the port feature due to a hardware error.\r
- @retval Others Other failure occurs.\r
-\r
-**/\r
-EFI_STATUS\r
-PeiHubSetHubFeature (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN UINT8 Value\r
- );\r
\r
/**\r
Get a given hub status.\r
);\r
}\r
\r
-/**\r
- Clear a given usb feature.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param Recipient The recipient of ClearFeature Request, should be one of Device/Interface/Endpoint.\r
- @param Value Request Value.\r
- @param Target Request Index.\r
-\r
- @retval EFI_SUCCESS Usb feature is cleared successfully.\r
- @retval EFI_DEVICE_ERROR Cannot clear the usb feature due to a hardware error.\r
- @retval Others Other failure occurs.\r
\r
-**/\r
-EFI_STATUS\r
-PeiUsbClearDeviceFeature (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN EFI_USB_RECIPIENT Recipient,\r
- IN UINT16 Value,\r
- IN UINT16 Target\r
- )\r
-{\r
- EFI_USB_DEVICE_REQUEST DevReq;\r
-\r
- ASSERT (UsbIoPpi != NULL);\r
-\r
- switch (Recipient) {\r
- case EfiUsbDevice:\r
- DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D;\r
- break;\r
-\r
- case EfiUsbInterface:\r
- DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I;\r
- break;\r
-\r
- case EfiUsbEndpoint:\r
- DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E;\r
- break;\r
- }\r
-\r
- DevReq.Request = USB_DEV_CLEAR_FEATURE;\r
- DevReq.Value = Value;\r
- DevReq.Index = Target;\r
- DevReq.Length = 0;\r
-\r
- return UsbIoPpi->UsbControlTransfer (\r
- PeiServices,\r
- UsbIoPpi,\r
- &DevReq,\r
- EfiUsbNoData,\r
- PcdGet32 (PcdUsbTransferTimeoutValue),\r
- NULL,\r
- 0\r
- );\r
-}\r
\r
/**\r
Configure a usb device to Configuration 1.\r
}\r
}\r
\r
-/**\r
- Judge if the port is in "connection change" status or not.\r
-\r
- @param PortChangeStatus The usb port change status gotten.\r
-\r
- @retval TRUE The port is in "connection change" status.\r
- @retval FALSE The port is NOT in "connection change" status.\r
\r
-**/\r
-BOOLEAN\r
-IsPortConnectChange (\r
- IN UINT16 PortChangeStatus\r
- )\r
-{\r
- //\r
- // return the bit 0 value of PortChangeStatus\r
- //\r
- if ((PortChangeStatus & USB_PORT_STAT_C_CONNECTION) != 0) {\r
- return TRUE;\r
- } else {\r
- return FALSE;\r
- }\r
-}\r
IN UINT16 AddressValue\r
);\r
\r
-/**\r
- Clear a given usb feature.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param Recipient The recipient of ClearFeature Request, should be one of Device/Interface/Endpoint.\r
- @param Value Request Value.\r
- @param Target Request Index.\r
-\r
- @retval EFI_SUCCESS Usb feature is cleared successfully.\r
- @retval EFI_DEVICE_ERROR Cannot clear the usb feature due to a hardware error.\r
- @retval Others Other failure occurs.\r
-\r
-**/\r
-EFI_STATUS\r
-PeiUsbClearDeviceFeature (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN EFI_USB_RECIPIENT Recipient,\r
- IN UINT16 Value,\r
- IN UINT16 Target\r
- );\r
\r
/**\r
Configure a usb device to Configuration 1.\r
IN UINT16 PortStatus\r
);\r
\r
-/**\r
- Judge if the port is in "connection change" status or not.\r
-\r
- @param PortChangeStatus The usb port change status gotten.\r
-\r
- @retval TRUE The port is in "connection change" status.\r
- @retval FALSE The port is NOT in "connection change" status.\r
-\r
-**/\r
-BOOLEAN\r
-IsPortConnectChange (\r
- IN UINT16 PortChangeStatus\r
- );\r
#endif\r