]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/UsbHostController.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / UsbHostController.h
CommitLineData
d1f95000 1/** @file\r
2 EFI_USB_HC_PROTOCOL as defined in EFI 1.10.\r
3\r
9095d37b
LG
4 The USB Host Controller Protocol is used by code, typically USB bus drivers,\r
5 running in the EFI boot services environment, to perform data transactions\r
4ca9b6c4
LG
6 over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.\r
7\r
9095d37b
LG
8 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9 This program and the accompanying materials\r
10 are licensed and made available under the terms and conditions of the BSD License\r
11 which accompanies this distribution. The full text of the license may be found at\r
12 http://opensource.org/licenses/bsd-license.php\r
d1f95000 13\r
9095d37b
LG
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
d1f95000 16\r
d1f95000 17**/\r
18\r
19#ifndef _USB_HOSTCONTROLLER_H_\r
20#define _USB_HOSTCONTROLLER_H_\r
21\r
22#include <Protocol/Usb2HostController.h>\r
23\r
24#define EFI_USB_HC_PROTOCOL_GUID \\r
25 { \\r
26 0xf5089266, 0x1aa0, 0x4953, {0x97, 0xd8, 0x56, 0x2f, 0x8a, 0x73, 0xb5, 0x19 } \\r
27 }\r
28\r
99e8ed21 29///\r
30/// Forward reference for pure ANSI compatability\r
31///\r
d1f95000 32typedef struct _EFI_USB_HC_PROTOCOL EFI_USB_HC_PROTOCOL;\r
33\r
34//\r
35// Protocol definitions\r
36//\r
37\r
9095d37b 38/**\r
d1f95000 39 Provides software reset for the USB host controller.\r
9095d37b 40\r
d1f95000 41 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
42 @param Attributes A bit mask of the reset operation to perform.\r
9095d37b 43\r
d1f95000 44 @retval EFI_SUCCESS The reset operation succeeded.\r
45 @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently supported\r
9095d37b 46 by the host controller hardware.\r
d1f95000 47 @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
48 @retval EFI_DEVICE_ERROR An error was encountered while attempting to perform the reset operation.\r
9095d37b 49\r
d1f95000 50**/\r
51typedef\r
52EFI_STATUS\r
8b13229b 53(EFIAPI *EFI_USB_HC_PROTOCOL_RESET)(\r
d1f95000 54 IN EFI_USB_HC_PROTOCOL *This,\r
55 IN UINT16 Attributes\r
56 );\r
57\r
9095d37b 58/**\r
d1f95000 59 Retrieves current state of the USB host controller.\r
9095d37b 60\r
d1f95000 61 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
62 @param State A pointer to the EFI_USB_HC_STATE data structure that\r
9095d37b
LG
63 indicates current state of the USB host controller.\r
64\r
d1f95000 65 @retval EFI_SUCCESS The state information of the host controller was returned in State.\r
66 @retval EFI_INVALID_PARAMETER State is NULL.\r
67 @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the host controller's\r
9095d37b
LG
68 current state.\r
69\r
d1f95000 70**/\r
71typedef\r
72EFI_STATUS\r
8b13229b 73(EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE)(\r
d1f95000 74 IN EFI_USB_HC_PROTOCOL *This,\r
75 OUT EFI_USB_HC_STATE *State\r
76 );\r
77\r
9095d37b 78/**\r
d1f95000 79 Sets the USB host controller to a specific state.\r
9095d37b 80\r
d1f95000 81 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
9095d37b
LG
82 @param State Indicates the state of the host controller that will be set.\r
83\r
d1f95000 84 @retval EFI_SUCCESS The USB host controller was successfully placed in the state specified by\r
9095d37b 85 State.\r
d1f95000 86 @retval EFI_INVALID_PARAMETER State is NULL.\r
9095d37b
LG
87 @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.\r
88\r
d1f95000 89**/\r
90typedef\r
91EFI_STATUS\r
8b13229b 92(EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE)(\r
d1f95000 93 IN EFI_USB_HC_PROTOCOL *This,\r
94 IN EFI_USB_HC_STATE State\r
95 );\r
96\r
9095d37b 97/**\r
d1f95000 98 Submits control transfer to a target USB device.\r
9095d37b 99\r
d1f95000 100 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
101 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b 102 assigned during USB enumeration.\r
d1f95000 103 @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r
9095d37b
LG
104 device.\r
105 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
106 transfer endpoint is capable of sending or receiving.\r
d1f95000 107 @param Request A pointer to the USB device request that will be sent to the USB\r
108 device.\r
9095d37b 109 @param TransferDirection Specifies the data direction for the transfer. There are three\r
2baabe0d 110 values available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r
9095d37b
LG
111 @param Data A pointer to the buffer of data that will be transmitted to USB\r
112 device or received from USB device.\r
d1f95000 113 @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r
9095d37b
LG
114 by Data. On output, indicates the amount of data actually\r
115 transferred.\r
d1f95000 116 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r
9095d37b
LG
117 is allowed to complete.\r
118 @param TransferResult A pointer to the detailed result information generated by this\r
d1f95000 119 control transfer.\r
9095d37b 120\r
d1f95000 121 @retval EFI_SUCCESS The control transfer was completed successfully.\r
9095d37b 122 @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.\r
d1f95000 123 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
124 @retval EFI_TIMEOUT The control transfer failed due to timeout.\r
125 @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.\r
9095d37b 126\r
d1f95000 127**/\r
128typedef\r
129EFI_STATUS\r
8b13229b 130(EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER)(\r
d1f95000 131 IN EFI_USB_HC_PROTOCOL *This,\r
132 IN UINT8 DeviceAddress,\r
133 IN BOOLEAN IsSlowDevice,\r
134 IN UINT8 MaximumPacketLength,\r
135 IN EFI_USB_DEVICE_REQUEST *Request,\r
136 IN EFI_USB_DATA_DIRECTION TransferDirection,\r
137 IN OUT VOID *Data OPTIONAL,\r
138 IN OUT UINTN *DataLength OPTIONAL,\r
139 IN UINTN TimeOut,\r
140 OUT UINT32 *TransferResult\r
141 );\r
142\r
9095d37b 143/**\r
d1f95000 144 Submits bulk transfer to a bulk endpoint of a USB device.\r
9095d37b 145\r
d1f95000 146 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
147 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b
LG
148 assigned during USB enumeration.\r
149 @param EndPointAddress The combination of an endpoint number and an endpoint\r
150 direction of the target USB device. Each endpoint address\r
151 supports data transfer in one direction except the control\r
152 endpoint (whose default endpoint address is 0). It is the\r
153 caller's responsibility to make sure that the EndPointAddress\r
154 represents a bulk endpoint.\r
155 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
156 transfer endpoint is capable of sending or receiving.\r
157 @param Data A pointer to the buffer of data that will be transmitted to USB\r
158 device or received from USB device.\r
d1f95000 159 @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r
9095d37b
LG
160 by Data. On output, indicates the amount of data actually\r
161 transferred.\r
162 @param DataToggle A pointer to the data toggle value.\r
d1f95000 163 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r
9095d37b 164 is allowed to complete.\r
d1f95000 165 @param TransferResult A pointer to the detailed result information of the bulk transfer.\r
9095d37b 166\r
d1f95000 167 @retval EFI_SUCCESS The bulk transfer was completed successfully.\r
9095d37b 168 @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to a lack of resources.\r
d1f95000 169 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
170 @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r
171 @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r
9095d37b 172\r
d1f95000 173**/\r
174typedef\r
175EFI_STATUS\r
8b13229b 176(EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER)(\r
d1f95000 177 IN EFI_USB_HC_PROTOCOL *This,\r
178 IN UINT8 DeviceAddress,\r
179 IN UINT8 EndPointAddress,\r
180 IN UINT8 MaximumPacketLength,\r
181 IN OUT VOID *Data,\r
182 IN OUT UINTN *DataLength,\r
183 IN OUT UINT8 *DataToggle,\r
184 IN UINTN TimeOut,\r
185 OUT UINT32 *TransferResult\r
186 );\r
187\r
9095d37b 188/**\r
d1f95000 189 Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r
9095d37b 190\r
d1f95000 191 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
192 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b 193 assigned during USB enumeration.\r
09254044 194 @param EndPointAddress The combination of an endpoint number and an endpoint\r
195 direction of the target USB device. Each endpoint address\r
196 supports data transfer in one direction except the control\r
197 endpoint (whose default endpoint address is zero). It is the\r
e9e65e2a 198 caller's responsibility to make sure that the\r
9095d37b 199 EndPointAddress represents an interrupt endpoint.\r
d1f95000 200 @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r
9095d37b
LG
201 device.\r
202 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
203 transfer endpoint is capable of sending or receiving.\r
204 @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host\r
205 and the target interrupt endpoint. If FALSE, the specified asynchronous\r
206 interrupt pipe is canceled. If TRUE, and an interrupt transfer exists\r
207 for the target end point, then EFI_INVALID_PARAMETER is returned.\r
208 @param DataToggle A pointer to the data toggle value. On input, it is valid when\r
209 IsNewTransfer is TRUE, and it indicates the initial data toggle\r
210 value the asynchronous interrupt transfer should adopt. On output,\r
211 it is valid when IsNewTransfer is FALSE, and it is updated to indicate\r
212 the data toggle value of the subsequent asynchronous interrupt transfer.\r
d1f95000 213 @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous\r
9095d37b 214 interrupt transfer is polled.\r
d1f95000 215 @param DataLength Indicates the length of data to be received at the rate specified by\r
9095d37b
LG
216 PollingInterval from the target asynchronous interrupt\r
217 endpoint. This parameter is only required when IsNewTransfer is TRUE.\r
218 @param CallBackFunction The Callback function. This function is called at the rate specified by\r
219 PollingInterval. This parameter is only required when IsNewTransfer is TRUE.\r
d1f95000 220 @param Context The context that is passed to the CallBackFunction.\r
9095d37b 221\r
d1f95000 222 @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully\r
9095d37b
LG
223 submitted or canceled.\r
224 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
d1f95000 225 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
226 @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r
227 @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r
9095d37b 228\r
d1f95000 229**/\r
230typedef\r
231EFI_STATUS\r
8b13229b 232(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(\r
d1f95000 233 IN EFI_USB_HC_PROTOCOL *This,\r
234 IN UINT8 DeviceAddress,\r
235 IN UINT8 EndPointAddress,\r
236 IN BOOLEAN IsSlowDevice,\r
237 IN UINT8 MaxiumPacketLength,\r
238 IN BOOLEAN IsNewTransfer,\r
239 IN OUT UINT8 *DataToggle,\r
240 IN UINTN PollingInterval OPTIONAL,\r
241 IN UINTN DataLength OPTIONAL,\r
242 IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,\r
243 IN VOID *Context OPTIONAL\r
244 );\r
245\r
9095d37b 246/**\r
d1f95000 247 Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r
9095d37b 248\r
d1f95000 249 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
250 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b 251 assigned during USB enumeration.\r
09254044 252 @param EndPointAddress The combination of an endpoint number and an endpoint\r
253 direction of the target USB device. Each endpoint address\r
254 supports data transfer in one direction except the control\r
255 endpoint (whose default endpoint address is zero). It is the\r
e9e65e2a 256 caller's responsibility to make sure that the\r
9095d37b 257 EndPointAddress represents an interrupt endpoint.\r
d1f95000 258 @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r
9095d37b
LG
259 device.\r
260 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
261 transfer endpoint is capable of sending or receiving.\r
d1f95000 262 @param Data A pointer to the buffer of data that will be transmitted to USB\r
9095d37b 263 device or received from USB device. asynchronous interrupt pipe is canceled.\r
d1f95000 264 @param DataLength On input, the size, in bytes, of the data buffer specified by Data.\r
9095d37b
LG
265 On output, the number of bytes transferred.\r
266 @param DataToggle A pointer to the data toggle value. On input, it indicates the initial\r
267 data toggle value the synchronous interrupt transfer should adopt;\r
268 on output, it is updated to indicate the data toggle value of the\r
269 subsequent synchronous interrupt transfer.\r
270 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r
271 is allowed to complete.\r
d1f95000 272 @param TransferResult A pointer to the detailed result information from the synchronous\r
273 interrupt transfer.\r
9095d37b 274\r
d1f95000 275 @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.\r
9095d37b 276 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
d1f95000 277 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
278 @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.\r
279 @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.\r
9095d37b 280\r
d1f95000 281**/\r
282typedef\r
283EFI_STATUS\r
8b13229b 284(EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(\r
d1f95000 285 IN EFI_USB_HC_PROTOCOL *This,\r
286 IN UINT8 DeviceAddress,\r
287 IN UINT8 EndPointAddress,\r
288 IN BOOLEAN IsSlowDevice,\r
289 IN UINT8 MaximumPacketLength,\r
290 IN OUT VOID *Data,\r
291 IN OUT UINTN *DataLength,\r
292 IN OUT UINT8 *DataToggle,\r
293 IN UINTN TimeOut,\r
294 OUT UINT32 *TransferResult\r
295 );\r
296\r
9095d37b 297/**\r
d1f95000 298 Submits isochronous transfer to an isochronous endpoint of a USB device.\r
9095d37b 299\r
d1f95000 300 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
301 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b 302 assigned during USB enumeration.\r
09254044 303 @param EndPointAddress The combination of an endpoint number and an endpoint\r
304 direction of the target USB device. Each endpoint address\r
305 supports data transfer in one direction except the control\r
e9e65e2a 306 endpoint (whose default endpoint address is 0). It is the caller's\r
09254044 307 responsibility to make sure that the EndPointAddress\r
9095d37b
LG
308 represents an isochronous endpoint.\r
309 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
310 transfer endpoint is capable of sending or receiving.\r
d1f95000 311 @param Data A pointer to the buffer of data that will be transmitted to USB\r
9095d37b 312 device or received from USB device. asynchronous interrupt pipe is canceled.\r
d1f95000 313 @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r
9095d37b 314 from the USB device.\r
d1f95000 315 @param TransferResult A pointer to the detailed result information from the isochronous\r
316 transfer.\r
9095d37b 317\r
d1f95000 318 @retval EFI_SUCCESS The isochronous transfer was completed successfully.\r
9095d37b 319 @retval EFI_OUT_OF_RESOURCES The isochronous could not be completed due to a lack of resources.\r
d1f95000 320 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
321 @retval EFI_TIMEOUT The isochronous transfer failed due to timeout.\r
322 @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.\r
9095d37b 323\r
d1f95000 324**/\r
325typedef\r
326EFI_STATUS\r
8b13229b 327(EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(\r
d1f95000 328 IN EFI_USB_HC_PROTOCOL *This,\r
329 IN UINT8 DeviceAddress,\r
330 IN UINT8 EndPointAddress,\r
331 IN UINT8 MaximumPacketLength,\r
332 IN OUT VOID *Data,\r
333 IN UINTN DataLength,\r
334 OUT UINT32 *TransferResult\r
335 );\r
336\r
9095d37b 337/**\r
d1f95000 338 Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.\r
9095d37b 339\r
d1f95000 340 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
341 @param DeviceAddress Represents the address of the target device on the USB, which is\r
9095d37b 342 assigned during USB enumeration.\r
09254044 343 @param EndPointAddress The combination of an endpoint number and an endpoint\r
344 direction of the target USB device. Each endpoint address\r
345 supports data transfer in one direction except the control\r
346 endpoint (whose default endpoint address is zero). It is the\r
e9e65e2a 347 caller's responsibility to make sure that the\r
9095d37b
LG
348 EndPointAddress represents an isochronous endpoint.\r
349 @param MaximumPacketLength Indicates the maximum packet size that the default control\r
350 transfer endpoint is capable of sending or receiving. For isochronous\r
351 endpoints, this value is used to reserve the bus time in the schedule,\r
2baabe0d 352 required for the perframe data payloads. The pipe may, on an ongoing basis,\r
9095d37b 353 actually use less bandwidth than that reserved.\r
d1f95000 354 @param Data A pointer to the buffer of data that will be transmitted to USB\r
9095d37b 355 device or received from USB device. asynchronous interrupt pipe is canceled.\r
d1f95000 356 @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r
9095d37b 357 from the USB device.\r
2baabe0d 358 @param IsochronousCallback The Callback function.This function is called if the requested\r
359 isochronous transfer is completed.\r
d1f95000 360 @param Context Data passed to the IsochronousCallback function. This is\r
361 an optional parameter and may be NULL.\r
9095d37b 362\r
d1f95000 363 @retval EFI_SUCCESS The asynchronous isochronous transfer was completed successfully.\r
9095d37b 364 @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous could not be completed due to a lack of resources.\r
d1f95000 365 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
9095d37b 366\r
d1f95000 367**/\r
368typedef\r
369EFI_STATUS\r
8b13229b 370(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(\r
d1f95000 371 IN EFI_USB_HC_PROTOCOL *This,\r
372 IN UINT8 DeviceAddress,\r
373 IN UINT8 EndPointAddress,\r
374 IN UINT8 MaximumPacketLength,\r
375 IN OUT VOID *Data,\r
376 IN UINTN DataLength,\r
377 IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r
378 IN VOID *Context OPTIONAL\r
379 );\r
380\r
9095d37b 381/**\r
d1f95000 382 Retrieves the number of root hub ports.\r
9095d37b 383\r
d1f95000 384 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
9095d37b
LG
385 @param PortNumber A pointer to the number of the root hub ports.\r
386\r
d1f95000 387 @retval EFI_SUCCESS The port number was retrieved successfully.\r
388 @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the port number.\r
389 @retval EFI_INVALID_PARAMETER PortNumber is NULL.\r
9095d37b 390\r
d1f95000 391**/\r
392typedef\r
393EFI_STATUS\r
8b13229b 394(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER)(\r
d1f95000 395 IN EFI_USB_HC_PROTOCOL *This,\r
396 OUT UINT8 *PortNumber\r
397 );\r
398\r
9095d37b 399/**\r
d1f95000 400 Retrieves the current status of a USB root hub port.\r
9095d37b 401\r
d1f95000 402 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
403 @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r
2baabe0d 404 This value is zero based. For example, if a root hub has two ports,\r
405 then the first port is numbered 0, and the second port is\r
406 numbered 1.\r
9095d37b
LG
407 @param PortStatus A pointer to the current port status bits and port status change bits.\r
408\r
d1f95000 409 @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber\r
9095d37b 410 was returned in PortStatus.\r
d1f95000 411 @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r
9095d37b 412\r
d1f95000 413**/\r
414typedef\r
415EFI_STATUS\r
8b13229b 416(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(\r
d1f95000 417 IN EFI_USB_HC_PROTOCOL *This,\r
418 IN UINT8 PortNumber,\r
419 OUT EFI_USB_PORT_STATUS *PortStatus\r
420 );\r
421\r
9095d37b 422/**\r
d1f95000 423 Sets a feature for the specified root hub port.\r
9095d37b 424\r
d1f95000 425 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
426 @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r
2baabe0d 427 This value is zero based. For example, if a root hub has two ports,\r
428 then the first port is numbered 0, and the second port is\r
429 numbered 1.\r
d1f95000 430 @param PortFeature Indicates the feature selector associated with the feature set\r
431 request.\r
9095d37b 432\r
d1f95000 433 @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB\r
9095d37b 434 root hub port specified by PortNumber.\r
d1f95000 435 @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r
9095d37b 436\r
d1f95000 437**/\r
438typedef\r
439EFI_STATUS\r
8b13229b 440(EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(\r
d1f95000 441 IN EFI_USB_HC_PROTOCOL *This,\r
442 IN UINT8 PortNumber,\r
443 IN EFI_USB_PORT_FEATURE PortFeature\r
444 );\r
445\r
9095d37b 446/**\r
d1f95000 447 Clears a feature for the specified root hub port.\r
9095d37b 448\r
d1f95000 449 @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r
2baabe0d 450 @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r
451 This value is zero based. For example, if a root hub has two ports,\r
452 then the first port is numbered 0, and the second port is\r
453 numbered 1.\r
d1f95000 454 @param PortFeature Indicates the feature selector associated with the feature clear\r
455 request.\r
9095d37b 456\r
d1f95000 457 @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB\r
9095d37b 458 root hub port specified by PortNumber.\r
d1f95000 459 @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r
9095d37b 460\r
d1f95000 461**/\r
462typedef\r
463EFI_STATUS\r
8b13229b 464(EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(\r
d1f95000 465 IN EFI_USB_HC_PROTOCOL *This,\r
466 IN UINT8 PortNumber,\r
467 IN EFI_USB_PORT_FEATURE PortFeature\r
468 );\r
469\r
4ca9b6c4 470\r
44717a39 471///\r
472/// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions\r
473/// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a\r
474/// system retrieves the EFI_USB_HC_PROTOCOL instance that is associated with the USB bus to be\r
475/// managed. A device handle for a USB host controller will minimally contain an\r
9095d37b 476/// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.\r
44717a39 477///\r
d1f95000 478struct _EFI_USB_HC_PROTOCOL {\r
479 EFI_USB_HC_PROTOCOL_RESET Reset;\r
480 EFI_USB_HC_PROTOCOL_GET_STATE GetState;\r
481 EFI_USB_HC_PROTOCOL_SET_STATE SetState;\r
482 EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;\r
483 EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;\r
484 EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;\r
485 EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;\r
486 EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;\r
487 EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;\r
488 EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber;\r
489 EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;\r
490 EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;\r
491 EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;\r
258cce13 492 ///\r
9095d37b
LG
493 /// The major revision number of the USB host controller. The revision information\r
494 /// indicates the release of the Universal Serial Bus Specification with which the\r
258cce13 495 /// host controller is compliant.\r
9095d37b 496 ///\r
d1f95000 497 UINT16 MajorRevision;\r
258cce13 498 ///\r
9095d37b
LG
499 /// The minor revision number of the USB host controller. The revision information\r
500 /// indicates the release of the Universal Serial Bus Specification with which the\r
501 /// host controller is compliant.\r
502 ///\r
d1f95000 503 UINT16 MinorRevision;\r
504};\r
505\r
506extern EFI_GUID gEfiUsbHcProtocolGuid;\r
507\r
508#endif\r