iPXE
UsbHostController.h
Go to the documentation of this file.
00001 /** @file
00002   EFI_USB_HC_PROTOCOL as defined in EFI 1.10.
00003 
00004   The USB Host Controller Protocol is used by code, typically USB bus drivers,
00005   running in the EFI boot services environment, to perform data transactions
00006   over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
00007 
00008   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
00009   This program and the accompanying materials
00010   are licensed and made available under the terms and conditions of the BSD License
00011   which accompanies this distribution.  The full text of the license may be found at
00012   http://opensource.org/licenses/bsd-license.php
00013 
00014   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00016 
00017 **/
00018 
00019 #ifndef _USB_HOSTCONTROLLER_H_
00020 #define _USB_HOSTCONTROLLER_H_
00021 
00022 FILE_LICENCE ( BSD3 );
00023 
00024 #include <ipxe/efi/Protocol/Usb2HostController.h>
00025 
00026 #define EFI_USB_HC_PROTOCOL_GUID \
00027   { \
00028     0xf5089266, 0x1aa0, 0x4953, {0x97, 0xd8, 0x56, 0x2f, 0x8a, 0x73, 0xb5, 0x19 } \
00029   }
00030 
00031 ///
00032 /// Forward reference for pure ANSI compatability
00033 ///
00034 typedef struct _EFI_USB_HC_PROTOCOL EFI_USB_HC_PROTOCOL;
00035 
00036 //
00037 // Protocol definitions
00038 //
00039 
00040 /**
00041   Provides software reset for the USB host controller.
00042 
00043   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00044   @param  Attributes            A bit mask of the reset operation to perform.
00045 
00046   @retval EFI_SUCCESS           The reset operation succeeded.
00047   @retval EFI_UNSUPPORTED       The type of reset specified by Attributes is not currently supported
00048                                 by the host controller hardware.
00049   @retval EFI_INVALID_PARAMETER Attributes is not valid.
00050   @retval EFI_DEVICE_ERROR      An error was encountered while attempting to perform the reset operation.
00051 
00052 **/
00053 typedef
00054 EFI_STATUS
00055 (EFIAPI *EFI_USB_HC_PROTOCOL_RESET)(
00056   IN EFI_USB_HC_PROTOCOL     *This,
00057   IN UINT16                  Attributes
00058   );
00059 
00060 /**
00061   Retrieves current state of the USB host controller.
00062 
00063   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00064   @param  State                 A pointer to the EFI_USB_HC_STATE data structure that
00065                                 indicates current state of the USB host controller.
00066 
00067   @retval EFI_SUCCESS           The state information of the host controller was returned in State.
00068   @retval EFI_INVALID_PARAMETER State is NULL.
00069   @retval EFI_DEVICE_ERROR      An error was encountered while attempting to retrieve the host controller's
00070                                 current state.
00071 
00072 **/
00073 typedef
00074 EFI_STATUS
00075 (EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE)(
00076   IN  EFI_USB_HC_PROTOCOL    *This,
00077   OUT EFI_USB_HC_STATE       *State
00078   );
00079 
00080 /**
00081   Sets the USB host controller to a specific state.
00082 
00083   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00084   @param  State                 Indicates the state of the host controller that will be set.
00085 
00086   @retval EFI_SUCCESS           The USB host controller was successfully placed in the state specified by
00087                                 State.
00088   @retval EFI_INVALID_PARAMETER State is NULL.
00089   @retval EFI_DEVICE_ERROR      Failed to set the state specified by State due to device error.
00090 
00091 **/
00092 typedef
00093 EFI_STATUS
00094 (EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE)(
00095   IN EFI_USB_HC_PROTOCOL     *This,
00096   IN EFI_USB_HC_STATE        State
00097   );
00098 
00099 /**
00100   Submits control transfer to a target USB device.
00101 
00102   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00103   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00104                                 assigned during USB enumeration.
00105   @param  IsSlowDevice          Indicates whether the target device is slow device or full-speed
00106                                 device.
00107   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00108                                 transfer endpoint is capable of sending or receiving.
00109   @param  Request               A pointer to the USB device request that will be sent to the USB
00110                                 device.
00111   @param  TransferDirection     Specifies the data direction for the transfer. There are three
00112                                 values available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.
00113   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00114                                 device or received from USB device.
00115   @param  DataLength            On input, indicates the size, in bytes, of the data buffer specified
00116                                 by Data. On output, indicates the amount of data actually
00117                                 transferred.
00118   @param  TimeOut               Indicates the maximum time, in milliseconds, which the transfer
00119                                 is allowed to complete.
00120   @param  TransferResult        A pointer to the detailed result information generated by this
00121                                 control transfer.
00122 
00123   @retval EFI_SUCCESS           The control transfer was completed successfully.
00124   @retval EFI_OUT_OF_RESOURCES  The control transfer could not be completed due to a lack of resources.
00125   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00126   @retval EFI_TIMEOUT           The control transfer failed due to timeout.
00127   @retval EFI_DEVICE_ERROR      The control transfer failed due to host controller or device error.
00128 
00129 **/
00130 typedef
00131 EFI_STATUS
00132 (EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER)(
00133   IN     EFI_USB_HC_PROTOCOL       *This,
00134   IN     UINT8                     DeviceAddress,
00135   IN     BOOLEAN                   IsSlowDevice,
00136   IN     UINT8                     MaximumPacketLength,
00137   IN     EFI_USB_DEVICE_REQUEST    *Request,
00138   IN     EFI_USB_DATA_DIRECTION    TransferDirection,
00139   IN OUT VOID                      *Data       OPTIONAL,
00140   IN OUT UINTN                     *DataLength OPTIONAL,
00141   IN     UINTN                     TimeOut,
00142   OUT    UINT32                    *TransferResult
00143   );
00144 
00145 /**
00146   Submits bulk transfer to a bulk endpoint of a USB device.
00147 
00148   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00149   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00150                                 assigned during USB enumeration.
00151   @param  EndPointAddress       The combination of an endpoint number and an endpoint
00152                                 direction of the target USB device. Each endpoint address
00153                                 supports data transfer in one direction except the control
00154                                 endpoint (whose default endpoint address is 0). It is the
00155                                 caller's responsibility to make sure that the EndPointAddress
00156                                 represents a bulk endpoint.
00157   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00158                                 transfer endpoint is capable of sending or receiving.
00159   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00160                                 device or received from USB device.
00161   @param  DataLength            On input, indicates the size, in bytes, of the data buffer specified
00162                                 by Data. On output, indicates the amount of data actually
00163                                 transferred.
00164   @param  DataToggle            A pointer to the data toggle value.
00165   @param  TimeOut               Indicates the maximum time, in milliseconds, which the transfer
00166                                 is allowed to complete.
00167   @param  TransferResult        A pointer to the detailed result information of the bulk transfer.
00168 
00169   @retval EFI_SUCCESS           The bulk transfer was completed successfully.
00170   @retval EFI_OUT_OF_RESOURCES  The bulk transfer could not be completed due to a lack of resources.
00171   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00172   @retval EFI_TIMEOUT           The bulk transfer failed due to timeout.
00173   @retval EFI_DEVICE_ERROR      The bulk transfer failed due to host controller or device error.
00174 
00175 **/
00176 typedef
00177 EFI_STATUS
00178 (EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER)(
00179   IN     EFI_USB_HC_PROTOCOL    *This,
00180   IN     UINT8                  DeviceAddress,
00181   IN     UINT8                  EndPointAddress,
00182   IN     UINT8                  MaximumPacketLength,
00183   IN OUT VOID                   *Data,
00184   IN OUT UINTN                  *DataLength,
00185   IN OUT UINT8                  *DataToggle,
00186   IN     UINTN                  TimeOut,
00187   OUT    UINT32                 *TransferResult
00188   );
00189 
00190 /**
00191   Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
00192 
00193   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00194   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00195                                 assigned during USB enumeration.
00196   @param  EndPointAddress       The combination of an endpoint number and an endpoint
00197                                 direction of the target USB device. Each endpoint address
00198                                 supports data transfer in one direction except the control
00199                                 endpoint (whose default endpoint address is zero). It is the
00200                                 caller's responsibility to make sure that the
00201                                 EndPointAddress represents an interrupt endpoint.
00202   @param  IsSlowDevice          Indicates whether the target device is slow device or full-speed
00203                                 device.
00204   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00205                                 transfer endpoint is capable of sending or receiving.
00206   @param  IsNewTransfer         If TRUE, an asynchronous interrupt pipe is built between the host
00207                                 and the target interrupt endpoint. If FALSE, the specified asynchronous
00208                                 interrupt pipe is canceled. If TRUE, and an interrupt transfer exists
00209                                 for the target end point, then EFI_INVALID_PARAMETER is returned.
00210   @param  DataToggle            A pointer to the data toggle value. On input, it is valid when
00211                                 IsNewTransfer is TRUE, and it indicates the initial data toggle
00212                                 value the asynchronous interrupt transfer should adopt. On output,
00213                                 it is valid when IsNewTransfer is FALSE, and it is updated to indicate
00214                                 the data toggle value of the subsequent asynchronous interrupt transfer.
00215   @param  PollingInterval       Indicates the interval, in milliseconds, that the asynchronous
00216                                 interrupt transfer is polled.
00217   @param  DataLength            Indicates the length of data to be received at the rate specified by
00218                                 PollingInterval from the target asynchronous interrupt
00219                                 endpoint. This parameter is only required when IsNewTransfer is TRUE.
00220   @param  CallBackFunction      The Callback function. This function is called at the rate specified by
00221                                 PollingInterval. This parameter is only required when IsNewTransfer is TRUE.
00222   @param  Context               The context that is passed to the CallBackFunction.
00223 
00224   @retval EFI_SUCCESS           The asynchronous interrupt transfer request has been successfully
00225                                 submitted or canceled.
00226   @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.
00227   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00228   @retval EFI_TIMEOUT           The bulk transfer failed due to timeout.
00229   @retval EFI_DEVICE_ERROR      The bulk transfer failed due to host controller or device error.
00230 
00231 **/
00232 typedef
00233 EFI_STATUS
00234 (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(
00235   IN     EFI_USB_HC_PROTOCOL                                 *This,
00236   IN     UINT8                                               DeviceAddress,
00237   IN     UINT8                                               EndPointAddress,
00238   IN     BOOLEAN                                             IsSlowDevice,
00239   IN     UINT8                                               MaxiumPacketLength,
00240   IN     BOOLEAN                                             IsNewTransfer,
00241   IN OUT UINT8                                               *DataToggle,
00242   IN     UINTN                                               PollingInterval  OPTIONAL,
00243   IN     UINTN                                               DataLength       OPTIONAL,
00244   IN     EFI_ASYNC_USB_TRANSFER_CALLBACK                     CallBackFunction OPTIONAL,
00245   IN     VOID                                                *Context         OPTIONAL
00246   );
00247 
00248 /**
00249   Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.
00250 
00251   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00252   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00253                                 assigned during USB enumeration.
00254   @param  EndPointAddress       The combination of an endpoint number and an endpoint
00255                                 direction of the target USB device. Each endpoint address
00256                                 supports data transfer in one direction except the control
00257                                 endpoint (whose default endpoint address is zero). It is the
00258                                 caller's responsibility to make sure that the
00259                                 EndPointAddress represents an interrupt endpoint.
00260   @param  IsSlowDevice          Indicates whether the target device is slow device or full-speed
00261                                 device.
00262   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00263                                 transfer endpoint is capable of sending or receiving.
00264   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00265                                 device or received from USB device.                                                                                            asynchronous interrupt pipe is canceled.
00266   @param  DataLength            On input, the size, in bytes, of the data buffer specified by Data.
00267                                 On output, the number of bytes transferred.
00268   @param  DataToggle            A pointer to the data toggle value. On input, it indicates the initial
00269                                 data toggle value the synchronous interrupt transfer should adopt;
00270                                 on output, it is updated to indicate the data toggle value of the
00271                                 subsequent synchronous interrupt transfer.
00272   @param  TimeOut               Indicates the maximum time, in milliseconds, which the transfer
00273                                 is allowed to complete.
00274   @param  TransferResult        A pointer to the detailed result information from the synchronous
00275                                 interrupt transfer.
00276 
00277   @retval EFI_SUCCESS           The synchronous interrupt transfer was completed successfully.
00278   @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.
00279   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00280   @retval EFI_TIMEOUT           The synchronous interrupt transfer failed due to timeout.
00281   @retval EFI_DEVICE_ERROR      The synchronous interrupt transfer failed due to host controller or device error.
00282 
00283 **/
00284 typedef
00285 EFI_STATUS
00286 (EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(
00287   IN     EFI_USB_HC_PROTOCOL    *This,
00288   IN     UINT8                  DeviceAddress,
00289   IN     UINT8                  EndPointAddress,
00290   IN     BOOLEAN                IsSlowDevice,
00291   IN     UINT8                  MaximumPacketLength,
00292   IN OUT VOID                   *Data,
00293   IN OUT UINTN                  *DataLength,
00294   IN OUT UINT8                  *DataToggle,
00295   IN     UINTN                  TimeOut,
00296   OUT    UINT32                 *TransferResult
00297   );
00298 
00299 /**
00300   Submits isochronous transfer to an isochronous endpoint of a USB device.
00301 
00302   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00303   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00304                                 assigned during USB enumeration.
00305   @param  EndPointAddress       The combination of an endpoint number and an endpoint
00306                                 direction of the target USB device. Each endpoint address
00307                                 supports data transfer in one direction except the control
00308                                 endpoint (whose default endpoint address is 0). It is the caller's
00309                                 responsibility to make sure that the EndPointAddress
00310                                 represents an isochronous endpoint.
00311   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00312                                 transfer endpoint is capable of sending or receiving.
00313   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00314                                 device or received from USB device.                                                                                            asynchronous interrupt pipe is canceled.
00315   @param  DataLength            Specifies the length, in bytes, of the data to be sent to or received
00316                                 from the USB device.
00317   @param  TransferResult        A pointer to the detailed result information from the isochronous
00318                                 transfer.
00319 
00320   @retval EFI_SUCCESS           The isochronous transfer was completed successfully.
00321   @retval EFI_OUT_OF_RESOURCES  The isochronous could not be completed due to a lack of resources.
00322   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00323   @retval EFI_TIMEOUT           The isochronous transfer failed due to timeout.
00324   @retval EFI_DEVICE_ERROR      The isochronous transfer failed due to host controller or device error.
00325 
00326 **/
00327 typedef
00328 EFI_STATUS
00329 (EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(
00330   IN     EFI_USB_HC_PROTOCOL    *This,
00331   IN     UINT8                  DeviceAddress,
00332   IN     UINT8                  EndPointAddress,
00333   IN     UINT8                  MaximumPacketLength,
00334   IN OUT VOID                   *Data,
00335   IN     UINTN                  DataLength,
00336   OUT    UINT32                 *TransferResult
00337   );
00338 
00339 /**
00340   Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
00341 
00342   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00343   @param  DeviceAddress         Represents the address of the target device on the USB, which is
00344                                 assigned during USB enumeration.
00345   @param  EndPointAddress       The combination of an endpoint number and an endpoint
00346                                 direction of the target USB device. Each endpoint address
00347                                 supports data transfer in one direction except the control
00348                                 endpoint (whose default endpoint address is zero). It is the
00349                                 caller's responsibility to make sure that the
00350                                 EndPointAddress represents an isochronous endpoint.
00351   @param  MaximumPacketLength   Indicates the maximum packet size that the default control
00352                                 transfer endpoint is capable of sending or receiving. For isochronous
00353                                 endpoints, this value is used to reserve the bus time in the schedule,
00354                                 required for the perframe data payloads. The pipe may, on an ongoing basis,
00355                                 actually use less bandwidth than that reserved.
00356   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00357                                 device or received from USB device.                                                                                            asynchronous interrupt pipe is canceled.
00358   @param  DataLength            Specifies the length, in bytes, of the data to be sent to or received
00359                                 from the USB device.
00360   @param  IsochronousCallback   The Callback function.This function is called if the requested
00361                                 isochronous transfer is completed.
00362   @param  Context               Data passed to the IsochronousCallback function. This is
00363                                 an optional parameter and may be NULL.
00364 
00365   @retval EFI_SUCCESS           The asynchronous isochronous transfer was completed successfully.
00366   @retval EFI_OUT_OF_RESOURCES  The asynchronous isochronous could not be completed due to a lack of resources.
00367   @retval EFI_INVALID_PARAMETER Some parameters are invalid.
00368 
00369 **/
00370 typedef
00371 EFI_STATUS
00372 (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(
00373   IN     EFI_USB_HC_PROTOCOL                *This,
00374   IN     UINT8                              DeviceAddress,
00375   IN     UINT8                              EndPointAddress,
00376   IN     UINT8                              MaximumPacketLength,
00377   IN OUT VOID                               *Data,
00378   IN     UINTN                              DataLength,
00379   IN     EFI_ASYNC_USB_TRANSFER_CALLBACK    IsochronousCallBack,
00380   IN     VOID                               *Context OPTIONAL
00381   );
00382 
00383 /**
00384   Retrieves the number of root hub ports.
00385 
00386   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00387   @param  PortNumber            A pointer to the number of the root hub ports.
00388 
00389   @retval EFI_SUCCESS           The port number was retrieved successfully.
00390   @retval EFI_DEVICE_ERROR      An error was encountered while attempting to retrieve the port number.
00391   @retval EFI_INVALID_PARAMETER PortNumber is NULL.
00392 
00393 **/
00394 typedef
00395 EFI_STATUS
00396 (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER)(
00397   IN EFI_USB_HC_PROTOCOL    *This,
00398   OUT UINT8                 *PortNumber
00399   );
00400 
00401 /**
00402   Retrieves the current status of a USB root hub port.
00403 
00404   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00405   @param  PortNumber            Specifies the root hub port from which the status is to be retrieved.
00406                                 This value is zero based. For example, if a root hub has two ports,
00407                                 then the first port is numbered 0, and the second port is
00408                                 numbered 1.
00409   @param  PortStatus            A pointer to the current port status bits and port status change bits.
00410 
00411   @retval EFI_SUCCESS           The status of the USB root hub port specified by PortNumber
00412                                 was returned in PortStatus.
00413   @retval EFI_INVALID_PARAMETER PortNumber is invalid.
00414 
00415 **/
00416 typedef
00417 EFI_STATUS
00418 (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(
00419   IN EFI_USB_HC_PROTOCOL     *This,
00420   IN  UINT8                  PortNumber,
00421   OUT EFI_USB_PORT_STATUS    *PortStatus
00422   );
00423 
00424 /**
00425   Sets a feature for the specified root hub port.
00426 
00427   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00428   @param  PortNumber            Specifies the root hub port from which the status is to be retrieved.
00429                                 This value is zero based. For example, if a root hub has two ports,
00430                                 then the first port is numbered 0, and the second port is
00431                                 numbered 1.
00432   @param  PortFeature           Indicates the feature selector associated with the feature set
00433                                 request.
00434 
00435   @retval EFI_SUCCESS           The feature specified by PortFeature was set for the USB
00436                                 root hub port specified by PortNumber.
00437   @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
00438 
00439 **/
00440 typedef
00441 EFI_STATUS
00442 (EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(
00443   IN EFI_USB_HC_PROTOCOL     *This,
00444   IN UINT8                   PortNumber,
00445   IN EFI_USB_PORT_FEATURE    PortFeature
00446   );
00447 
00448 /**
00449   Clears a feature for the specified root hub port.
00450 
00451   @param  This                  A pointer to the EFI_USB_HC_PROTOCOL instance.
00452   @param  PortNumber            Specifies the root hub port from which the status is to be retrieved.
00453                                 This value is zero based. For example, if a root hub has two ports,
00454                                 then the first port is numbered 0, and the second port is
00455                                 numbered 1.
00456   @param  PortFeature           Indicates the feature selector associated with the feature clear
00457                                 request.
00458 
00459   @retval EFI_SUCCESS           The feature specified by PortFeature was cleared for the USB
00460                                 root hub port specified by PortNumber.
00461   @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
00462 
00463 **/
00464 typedef
00465 EFI_STATUS
00466 (EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(
00467   IN EFI_USB_HC_PROTOCOL     *This,
00468   IN UINT8                   PortNumber,
00469   IN EFI_USB_PORT_FEATURE    PortFeature
00470   );
00471 
00472 
00473 ///
00474 /// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions
00475 /// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a
00476 /// system retrieves the EFI_USB_HC_PROTOCOL instance that is associated with the USB bus to be
00477 /// managed. A device handle for a USB host controller will minimally contain an
00478 /// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.
00479 ///
00480 struct _EFI_USB_HC_PROTOCOL {
00481   EFI_USB_HC_PROTOCOL_RESET                       Reset;
00482   EFI_USB_HC_PROTOCOL_GET_STATE                   GetState;
00483   EFI_USB_HC_PROTOCOL_SET_STATE                   SetState;
00484   EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER            ControlTransfer;
00485   EFI_USB_HC_PROTOCOL_BULK_TRANSFER               BulkTransfer;
00486   EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER    AsyncInterruptTransfer;
00487   EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER     SyncInterruptTransfer;
00488   EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER        IsochronousTransfer;
00489   EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER  AsyncIsochronousTransfer;
00490   EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER     GetRootHubPortNumber;
00491   EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS     GetRootHubPortStatus;
00492   EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE    SetRootHubPortFeature;
00493   EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE  ClearRootHubPortFeature;
00494   ///
00495   /// The major revision number of the USB host controller. The revision information
00496   /// indicates the release of the Universal Serial Bus Specification with which the
00497   /// host controller is compliant.
00498   ///
00499   UINT16                                          MajorRevision;
00500   ///
00501   /// The minor revision number of the USB host controller. The revision information
00502   /// indicates the release of the Universal Serial Bus Specification with which the
00503   /// host controller is compliant.
00504   ///
00505   UINT16                                          MinorRevision;
00506 };
00507 
00508 extern EFI_GUID gEfiUsbHcProtocolGuid;
00509 
00510 #endif