]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg UsbBusDxe: Remove redundant functions
authorshenglei <shenglei.zhang@intel.com>
Wed, 8 Aug 2018 07:39:50 +0000 (15:39 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 21 Aug 2018 08:29:02 +0000 (16:29 +0800)
The functions that are never called have been removed.
They are UsbHubCtrlSetHubFeature,UsbHubCtrlResetTT,UsbHcReset,
UsbHcAsyncIsochronousTransfer,UsbHcGetState,UsbHcSetState and
UsbHcIsochronousTransfer.
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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h

index 2ce5726e632d5f7694a737a9cc9b7f3a248ffa15..fdb3276a825e2193120915f4aec3b8685fae3499 100644 (file)
@@ -317,74 +317,6 @@ UsbHubCtrlGetPortStatus (
 }\r
 \r
 \r
-/**\r
-  Usb hub control transfer to reset the TT (Transaction Transaltor).\r
-\r
-  @param  HubDev                The hub device.\r
-  @param  Port                  The port of the hub.\r
-\r
-  @retval EFI_SUCCESS           The TT of the hub is reset.\r
-  @retval Others                Failed to reset the port.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHubCtrlResetTT (\r
-  IN  USB_DEVICE          *HubDev,\r
-  IN  UINT8               Port\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
-\r
-  Status = UsbCtrlRequest (\r
-             HubDev,\r
-             EfiUsbNoData,\r
-             USB_REQ_TYPE_CLASS,\r
-             USB_HUB_TARGET_HUB,\r
-             USB_HUB_REQ_RESET_TT,\r
-             0,\r
-             (UINT16) (Port + 1),\r
-             NULL,\r
-             0\r
-             );\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Usb hub control transfer to set the hub feature.\r
-\r
-  @param  HubDev                The hub device.\r
-  @param  Feature               The feature to set.\r
-\r
-  @retval EFI_SUCESS            The feature is set for the hub.\r
-  @retval Others                Failed to set the feature.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHubCtrlSetHubFeature (\r
-  IN  USB_DEVICE          *HubDev,\r
-  IN  UINT8               Feature\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
-\r
-  Status = UsbCtrlRequest (\r
-             HubDev,\r
-             EfiUsbNoData,\r
-             USB_REQ_TYPE_CLASS,\r
-             USB_HUB_TARGET_HUB,\r
-             USB_HUB_REQ_SET_FEATURE,\r
-             Feature,\r
-             0,\r
-             NULL,\r
-             0\r
-             );\r
-\r
-  return Status;\r
-}\r
-\r
-\r
 /**\r
   Usb hub control transfer to set the port feature.\r
 \r
index e9b5fefb9ad796291c91acad4e8d6e92a3c79a35..e405edfd4a410e68ee324601002d5b00ff2020f4 100644 (file)
@@ -90,90 +90,12 @@ UsbHcGetCapability (
 }\r
 \r
 \r
-/**\r
-  Reset the host controller.\r
 \r
-  @param  UsbBus                The usb bus driver.\r
-  @param  Attributes            The reset type, only global reset is used by this driver.\r
 \r
-  @retval EFI_SUCCESS           The reset operation succeeded.\r
-  @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
-  @retval EFI_UNSUPPOURTED      The type of reset specified by Attributes is\r
-                                not currently supported by the host controller.\r
-  @retval EFI_DEVICE_ERROR      Host controller isn't halted to reset.\r
-**/\r
-EFI_STATUS\r
-UsbHcReset (\r
-  IN USB_BUS              *UsbBus,\r
-  IN UINT16               Attributes\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
 \r
-  if (UsbBus->Usb2Hc != NULL) {\r
-    Status = UsbBus->Usb2Hc->Reset (UsbBus->Usb2Hc, Attributes);\r
-  } else {\r
-    Status = UsbBus->UsbHc->Reset (UsbBus->UsbHc, Attributes);\r
-  }\r
 \r
-  return Status;\r
-}\r
 \r
 \r
-/**\r
-  Get the current operation state of the host controller.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  State            The host controller operation state.\r
-\r
-  @retval EFI_SUCCESS      The operation state is returned in State.\r
-  @retval Others           Failed to get the host controller state.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcGetState (\r
-  IN  USB_BUS             *UsbBus,\r
-  OUT EFI_USB_HC_STATE    *State\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
-\r
-  if (UsbBus->Usb2Hc != NULL) {\r
-    Status = UsbBus->Usb2Hc->GetState (UsbBus->Usb2Hc, State);\r
-  } else {\r
-    Status = UsbBus->UsbHc->GetState (UsbBus->UsbHc, State);\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Set the host controller operation state.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  State            The state to set.\r
-\r
-  @retval EFI_SUCCESS      The host controller is now working at State.\r
-  @retval Others           Failed to set operation state.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcSetState (\r
-  IN USB_BUS              *UsbBus,\r
-  IN EFI_USB_HC_STATE     State\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
-\r
-  if (UsbBus->Usb2Hc != NULL) {\r
-    Status = UsbBus->Usb2Hc->SetState (UsbBus->Usb2Hc, State);\r
-  } else {\r
-    Status = UsbBus->UsbHc->SetState (UsbBus->UsbHc, State);\r
-  }\r
-\r
-  return Status;\r
-}\r
 \r
 \r
 /**\r
@@ -563,78 +485,10 @@ UsbHcSyncInterruptTransfer (
 }\r
 \r
 \r
-/**\r
-  Execute a synchronous Isochronous USB transfer.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  DevAddr          The target device address.\r
-  @param  EpAddr           The target endpoint address, with direction encoded in\r
-                           bit 7.\r
-  @param  DevSpeed         The device's speed.\r
-  @param  MaxPacket        The endpoint's max packet size.\r
-  @param  BufferNum        The number of data buffer.\r
-  @param  Data             Array of pointers to data buffer.\r
-  @param  DataLength       The length of data buffer.\r
-  @param  Translator       The transaction translator for low/full speed device.\r
-  @param  UsbResult        The result of USB execution.\r
-\r
-  @retval EFI_UNSUPPORTED  The isochronous transfer isn't supported now.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcIsochronousTransfer (\r
-  IN  USB_BUS                             *UsbBus,\r
-  IN  UINT8                               DevAddr,\r
-  IN  UINT8                               EpAddr,\r
-  IN  UINT8                               DevSpeed,\r
-  IN  UINTN                               MaxPacket,\r
-  IN  UINT8                               BufferNum,\r
-  IN  OUT VOID                            *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
-  IN  UINTN                               DataLength,\r
-  IN  EFI_USB2_HC_TRANSACTION_TRANSLATOR  *Translator,\r
-  OUT UINT32                              *UsbResult\r
-  )\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
 \r
 \r
-/**\r
-  Queue an asynchronous isochronous transfer.\r
 \r
-  @param  UsbBus           The USB bus driver.\r
-  @param  DevAddr          The target device address.\r
-  @param  EpAddr           The target endpoint address, with direction encoded in\r
-                           bit 7.\r
-  @param  DevSpeed         The device's speed.\r
-  @param  MaxPacket        The endpoint's max packet size.\r
-  @param  BufferNum        The number of data buffer.\r
-  @param  Data             Array of pointers to data buffer.\r
-  @param  DataLength       The length of data buffer.\r
-  @param  Translator       The transaction translator for low/full speed device.\r
-  @param  Callback         The function to call when data is transferred.\r
-  @param  Context          The context to the callback function.\r
-\r
-  @retval EFI_UNSUPPORTED  The asynchronous isochronous transfer isn't supported.\r
 \r
-**/\r
-EFI_STATUS\r
-UsbHcAsyncIsochronousTransfer (\r
-  IN  USB_BUS                             *UsbBus,\r
-  IN  UINT8                               DevAddr,\r
-  IN  UINT8                               EpAddr,\r
-  IN  UINT8                               DevSpeed,\r
-  IN  UINTN                               MaxPacket,\r
-  IN  UINT8                               BufferNum,\r
-  IN OUT VOID                             *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
-  IN  UINTN                               DataLength,\r
-  IN  EFI_USB2_HC_TRANSACTION_TRANSLATOR  *Translator,\r
-  IN  EFI_ASYNC_USB_TRANSFER_CALLBACK     Callback,\r
-  IN  VOID                                *Context\r
-  )\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r
 \r
 \r
 /**\r
index 26709caa36de892141d7aca73397e9d3204ae10d..ef19e77c4033875082f7582d200bb2b014146265 100644 (file)
@@ -36,55 +36,6 @@ UsbHcGetCapability (
   OUT UINT8               *Is64BitCapable\r
   );\r
 \r
-/**\r
-  Reset the host controller.\r
-\r
-  @param  UsbBus                The usb bus driver.\r
-  @param  Attributes            The reset type, only global reset is used by this driver.\r
-\r
-  @retval EFI_SUCCESS           The reset operation succeeded.\r
-  @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
-  @retval EFI_UNSUPPOURTED      The type of reset specified by Attributes is\r
-                                not currently supported by the host controller.\r
-  @retval EFI_DEVICE_ERROR      Host controller isn't halted to reset.\r
-**/\r
-EFI_STATUS\r
-UsbHcReset (\r
-  IN USB_BUS              *UsbBus,\r
-  IN UINT16               Attributes\r
-  );\r
-\r
-/**\r
-  Get the current operation state of the host controller.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  State            The host controller operation state.\r
-\r
-  @retval EFI_SUCCESS      The operation state is returned in State.\r
-  @retval Others           Failed to get the host controller state.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcGetState (\r
-  IN  USB_BUS             *UsbBus,\r
-  OUT EFI_USB_HC_STATE    *State\r
-  );\r
-\r
-/**\r
-  Set the host controller operation state.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  State            The state to set.\r
-\r
-  @retval EFI_SUCCESS      The host controller is now working at State.\r
-  @retval Others           Failed to set operation state.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcSetState (\r
-  IN  USB_BUS             *UsbBus,\r
-  IN EFI_USB_HC_STATE     State\r
-  );\r
 \r
 /**\r
   Get the root hub port state.\r
@@ -286,71 +237,6 @@ UsbHcSyncInterruptTransfer (
   OUT UINT32                              *UsbResult\r
   );\r
 \r
-/**\r
-  Execute a synchronous Isochronous USB transfer.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  DevAddr          The target device address.\r
-  @param  EpAddr           The target endpoint address, with direction encoded in\r
-                           bit 7.\r
-  @param  DevSpeed         The device's speed.\r
-  @param  MaxPacket        The endpoint's max packet size.\r
-  @param  BufferNum        The number of data buffer.\r
-  @param  Data             Array of pointers to data buffer.\r
-  @param  DataLength       The length of data buffer.\r
-  @param  Translator       The transaction translator for low/full speed device.\r
-  @param  UsbResult        The result of USB execution.\r
-\r
-  @retval EFI_UNSUPPORTED  The isochronous transfer isn't supported now.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcIsochronousTransfer (\r
-  IN  USB_BUS                             *UsbBus,\r
-  IN  UINT8                               DevAddr,\r
-  IN  UINT8                               EpAddr,\r
-  IN  UINT8                               DevSpeed,\r
-  IN  UINTN                               MaxPacket,\r
-  IN  UINT8                               BufferNum,\r
-  IN  OUT VOID                            *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
-  IN  UINTN                               DataLength,\r
-  IN  EFI_USB2_HC_TRANSACTION_TRANSLATOR  *Translator,\r
-  OUT UINT32                              *UsbResult\r
-  );\r
-\r
-/**\r
-  Queue an asynchronous isochronous transfer.\r
-\r
-  @param  UsbBus           The USB bus driver.\r
-  @param  DevAddr          The target device address.\r
-  @param  EpAddr           The target endpoint address, with direction encoded in\r
-                           bit 7.\r
-  @param  DevSpeed         The device's speed.\r
-  @param  MaxPacket        The endpoint's max packet size.\r
-  @param  BufferNum        The number of data buffer.\r
-  @param  Data             Array of pointers to data buffer.\r
-  @param  DataLength       The length of data buffer.\r
-  @param  Translator       The transaction translator for low/full speed device.\r
-  @param  Callback         The function to call when data is transferred.\r
-  @param  Context          The context to the callback function.\r
-\r
-  @retval EFI_UNSUPPORTED  The asynchronous isochronous transfer isn't supported.\r
-\r
-**/\r
-EFI_STATUS\r
-UsbHcAsyncIsochronousTransfer (\r
-  IN  USB_BUS                             *UsbBus,\r
-  IN  UINT8                               DevAddr,\r
-  IN  UINT8                               EpAddr,\r
-  IN  UINT8                               DevSpeed,\r
-  IN  UINTN                               MaxPacket,\r
-  IN  UINT8                               BufferNum,\r
-  IN OUT VOID                             *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
-  IN  UINTN                               DataLength,\r
-  IN  EFI_USB2_HC_TRANSACTION_TRANSLATOR  *Translator,\r
-  IN  EFI_ASYNC_USB_TRANSFER_CALLBACK     Callback,\r
-  IN  VOID                                *Context\r
-  );\r
 \r
 /**\r
   Open the USB host controller protocol BY_CHILD.\r