]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Usb2HostController.h
Keep the C name of SIMPLE TEXT OUTPUT PROTOCOL unchanged for backward-compatible...
[mirror_edk2.git] / MdePkg / Include / Protocol / Usb2HostController.h
CommitLineData
d1f95000 1/** @file\r
2 EFI_USB2_HC_PROTOCOL as defined in UEFI 2.0.\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 Module Name: Usb2HostController.h\r
14\r
15**/\r
16\r
17#ifndef _USB2_HOSTCONTROLLER_H_\r
18#define _USB2_HOSTCONTROLLER_H_\r
19\r
20#include <IndustryStandard/Usb.h>\r
21#include <Protocol/UsbIo.h>\r
22\r
23#define EFI_USB2_HC_PROTOCOL_GUID \\r
24 { \\r
25 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \\r
26 }\r
27\r
28//\r
29// Forward reference for pure ANSI compatability\r
30//\r
31typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL;\r
32\r
33#define EFI_USB_SPEED_FULL 0x0000 // 12 Mb/s, USB 1.1 OHCI and UHCI HC.\r
34#define EFI_USB_SPEED_LOW 0x0001 // 1 Mb/s, USB 1.1 OHCI and UHCI HC.\r
35#define EFI_USB_SPEED_HIGH 0x0002 // 480 Mb/s, USB 2.0 EHCI HC.\r
36\r
37typedef struct {\r
38 UINT8 TranslatorHubAddress;\r
39 UINT8 TranslatorPortNumber;\r
40} EFI_USB2_HC_TRANSACTION_TRANSLATOR;\r
41\r
42//\r
43// Protocol definitions\r
44//\r
45\r
46/**\r
47 Retrieves the Host Controller capabilities.\r
48\r
49 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
50 @param MaxSpeed Host controller data transfer speed.\r
51 @param PortNumber Number of the root hub ports.\r
52 @param Is64BitCapable TRUE if controller supports 64-bit memory addressing,\r
53 FALSE otherwise.\r
54\r
55 @retval EFI_SUCCESS The host controller capabilities were retrieved successfully.\r
56 @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
57 @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r
58 retrieve the capabilities.\r
59\r
60**/\r
61typedef\r
62EFI_STATUS\r
63(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_CAPABILITY) (\r
64 IN EFI_USB2_HC_PROTOCOL *This,\r
65 OUT UINT8 *MaxSpeed,\r
66 OUT UINT8 *PortNumber,\r
67 OUT UINT8 *Is64BitCapable\r
68 )\r
69;\r
70\r
71/**\r
72 Provides software reset for the USB host controller.\r
73\r
74 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
75 @param Attributes A bit mask of the reset operation to perform.\r
76\r
77 @retval EFI_SUCCESS The reset operation succeeded.\r
78 @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
79 @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently\r
80 supported by the host controller hardware.\r
81 @retval EFI_ACCESS_DENIED Reset operation is rejected due to the debug port being configured\r
82 and active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or\r
83 EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Attributes can be used to\r
84 perform reset operation for this host controller.\r
85 @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r
86 retrieve the capabilities.\r
87\r
88**/\r
89typedef\r
90EFI_STATUS\r
91(EFIAPI *EFI_USB2_HC_PROTOCOL_RESET) (\r
92 IN EFI_USB2_HC_PROTOCOL *This,\r
93 IN UINT16 Attributes\r
94 )\r
95;\r
96\r
97/**\r
98 \r
99 @param EfiUsbHcStateHalt The host controller is in halt\r
100 state. No USB transactions can occur\r
101 while in this state. The host\r
102 controller can enter this state for\r
103 three reasons: 1) After host\r
104 controller hardware reset. 2)\r
105 Explicitly set by software. 3)\r
106 Triggered by a fatal error such as\r
107 consistency check failure.\r
108 \r
109 \r
110 @param EfiUsbHcStateOperational The host controller is in an\r
111 operational state. When in\r
112 this state, the host\r
113 controller can execute bus\r
114 traffic. This state must be\r
115 explicitly set to enable the\r
116 USB bus traffic.\r
117 \r
118 \r
119 @param EfiUsbHcStateSuspend The host controller is in the\r
120 suspend state. No USB\r
121 transactions can occur while in\r
122 this state. The host controller\r
123 enters this state for the\r
124 following reasons: 1) Explicitly\r
125 set by software. 2) Triggered\r
126 when there is no bus traffic for\r
127 3 microseconds.\r
128 \r
129**/\r
130typedef enum {\r
131 EfiUsbHcStateHalt,\r
132 EfiUsbHcStateOperational,\r
133 EfiUsbHcStateSuspend,\r
134 EfiUsbHcStateMaximum\r
135} EFI_USB_HC_STATE;\r
136\r
137/**\r
138 Retrieves current state of the USB host controller.\r
139\r
140 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
141 @param State A pointer to the EFI_USB_HC_STATE data structure that\r
142 indicates current state of the USB host controller.\r
143\r
144 @retval EFI_SUCCESS The state information of the host controller was returned in State.\r
145 @retval EFI_INVALID_PARAMETER State is NULL.\r
146 @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the\r
147 host controller's current state.\r
148\r
149**/\r
150typedef\r
151EFI_STATUS\r
152(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE) (\r
153 IN CONST EFI_USB2_HC_PROTOCOL *This,\r
154 OUT EFI_USB_HC_STATE *State\r
155)\r
156; \r
157\r
158/**\r
159 Sets the USB host controller to a specific state.\r
160\r
161 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
162 @param State Indicates the state of the host controller that will be set.\r
163\r
164 @retval EFI_SUCCESS The USB host controller was successfully placed in the state\r
165 specified by State.\r
166 @retval EFI_INVALID_PARAMETER State is not valid.\r
167 @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.\r
168\r
169**/\r
170typedef\r
171EFI_STATUS\r
172(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_STATE) (\r
173 IN EFI_USB2_HC_PROTOCOL *This,\r
174 IN EFI_USB_HC_STATE State\r
175 )\r
176;\r
177\r
178/**\r
179 Submits control transfer to a target USB device.\r
180\r
181 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
182 @param DeviceAddress Represents the address of the target device on the USB.\r
183 @param DeviceSpeed Indicates device speed.\r
184 @param MaximumPacketLength Indicates the maximum packet size that the default control transfer\r
185 endpoint is capable of sending or receiving.\r
186 @param Request A pointer to the USB device request that will be sent to the USB device.\r
187 @param TransferDirection Specifies the data direction for the transfer. There are three values\r
188 available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r
189 @param Data A pointer to the buffer of data that will be transmitted to USB device or\r
190 received from USB device.\r
191 @param DataLength On input, indicates the size, in bytes, of the data buffer specified by Data.\r
192 On output, indicates the amount of data actually transferred.\r
193 @param Translator A pointer to the transaction translator data.\r
194 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r
195 allowed to complete.\r
196 @param TransferResult A pointer to the detailed result information generated by this control\r
197 transfer.\r
198\r
199 @retval EFI_SUCCESS The control transfer was completed successfully.\r
200 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
201 @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.\r
202 @retval EFI_TIMEOUT The control transfer failed due to timeout.\r
203 @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.\r
204 Caller should check TransferResult for detailed error information.\r
205\r
206**/\r
207typedef\r
208EFI_STATUS\r
209(EFIAPI *EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER) (\r
210 IN EFI_USB2_HC_PROTOCOL *This,\r
211 IN UINT8 DeviceAddress,\r
212 IN UINT8 DeviceSpeed,\r
213 IN UINTN MaximumPacketLength,\r
214 IN EFI_USB_DEVICE_REQUEST *Request,\r
215 IN EFI_USB_DATA_DIRECTION TransferDirection,\r
216 IN OUT VOID *Data OPTIONAL,\r
217 IN OUT UINTN *DataLength OPTIONAL,\r
218 IN UINTN TimeOut,\r
219 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
220 OUT UINT32 *TransferResult\r
221 )\r
222; \r
223\r
224#define EFI_USB_MAX_BULK_BUFFER_NUM 10\r
225\r
226/**\r
227 Submits bulk transfer to a bulk endpoint of a USB device.\r
228\r
229 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
230 @param DeviceAddress Represents the address of the target device on the USB.\r
231 @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r
232 target USB device.\r
233 @param DeviceSpeed Indicates device speed.\r
234 @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r
235 sending or receiving.\r
236 @param DataBuffersNumber Number of data buffers prepared for the transfer.\r
237 @param Data Array of pointers to the buffers of data that will be transmitted to USB\r
238 device or received from USB device.\r
239 @param DataLength When input, indicates the size, in bytes, of the data buffers specified by\r
240 Data. When output, indicates the actually transferred data size.\r
241 @param DataToggle A pointer to the data toggle value.\r
242 @param Translator A pointer to the transaction translator data.\r
243 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r
244 allowed to complete.\r
245 @param TransferResult A pointer to the detailed result information of the bulk transfer.\r
246\r
247 @retval EFI_SUCCESS The bulk transfer was completed successfully.\r
248 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
249 @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be submitted due to a lack of resources.\r
250 @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r
251 @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r
252 Caller should check TransferResult for detailed error information.\r
253\r
254**/\r
255typedef\r
256EFI_STATUS\r
257(EFIAPI *EFI_USB2_HC_PROTOCOL_BULK_TRANSFER) (\r
258 IN EFI_USB2_HC_PROTOCOL *This,\r
259 IN UINT8 DeviceAddress,\r
260 IN UINT8 EndPointAddress,\r
261 IN UINT8 DeviceSpeed,\r
262 IN UINTN MaximumPacketLength,\r
263 IN UINT8 DataBuffersNumber,\r
264 IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],\r
265 IN OUT UINTN *DataLength,\r
266 IN OUT UINT8 *DataToggle,\r
267 IN UINTN TimeOut,\r
268 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
269 OUT UINT32 *TransferResult\r
270 )\r
271;\r
272\r
273/**\r
274 Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r
275 Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r
276 \r
277 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
278 @param DeviceAddress Represents the address of the target device on the USB.\r
279 @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r
280 target USB device.\r
281 @param DeviceSpeed Indicates device speed.\r
282 @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r
283 sending or receiving.\r
284 @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host and the\r
285 target interrupt endpoint. If FALSE, the specified asynchronous interrupt\r
286 pipe is canceled. If TRUE, and an interrupt transfer exists for the target\r
287 end point, then EFI_INVALID_PARAMETER is returned.\r
288 @param DataToggle A pointer to the data toggle value.\r
289 @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous interrupt\r
290 transfer is polled.\r
291 @param DataLength Indicates the length of data to be received at the rate specified by\r
292 PollingInterval from the target asynchronous interrupt endpoint.\r
293 @param Translator A pointr to the transaction translator data.\r
294 @param CallBackFunction The Callback function. This function is called at the rate specified by\r
295 PollingInterval.\r
296 @param Context The context that is passed to the CallBackFunction. This is an\r
297 optional parameter and may be NULL.\r
298\r
299 @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully\r
300 submitted or canceled.\r
301 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
302 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
303\r
304**/\r
305typedef\r
306EFI_STATUS\r
307(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER) (\r
308 IN EFI_USB2_HC_PROTOCOL *This,\r
309 IN UINT8 DeviceAddress,\r
310 IN UINT8 EndPointAddress,\r
311 IN UINT8 DeviceSpeed,\r
312 IN UINTN MaxiumPacketLength,\r
313 IN BOOLEAN IsNewTransfer,\r
314 IN OUT UINT8 *DataToggle,\r
315 IN UINTN PollingInterval OPTIONAL,\r
316 IN UINTN DataLength OPTIONAL,\r
317 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL,\r
318 IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,\r
319 IN VOID *Context OPTIONAL\r
320 )\r
321;\r
322\r
323/**\r
324 Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r
325 Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r
326\r
327 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
328 @param DeviceAddress Represents the address of the target device on the USB.\r
329 @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r
330 target USB device.\r
331 @param DeviceSpeed Indicates device speed.\r
332 @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r
333 sending or receiving.\r
334 @param Data A pointer to the buffer of data that will be transmitted to USB device or\r
335 received from USB device.\r
336 @param DataLength On input, the size, in bytes, of the data buffer specified by Data. On\r
337 output, the number of bytes transferred.\r
338 @param DataToggle A pointer to the data toggle value.\r
339 @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r
340 allowed to complete.\r
341 @param Translator A pointr to the transaction translator data.\r
342 @param TransferResult A pointer to the detailed result information from the synchronous\r
343 interrupt transfer.\r
344\r
345 @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.\r
346 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
347 @retval EFI_OUT_OF_RESOURCES The synchronous interrupt transfer could not be submitted due to a lack of resources.\r
348 @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.\r
349 @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.\r
350 Caller should check TransferResult for detailed error information.\r
351\r
352**/\r
353typedef\r
354EFI_STATUS\r
355(EFIAPI *EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER) (\r
356 IN EFI_USB2_HC_PROTOCOL *This,\r
357 IN UINT8 DeviceAddress,\r
358 IN UINT8 EndPointAddress,\r
359 IN UINT8 DeviceSpeed,\r
360 IN UINTN MaximumPacketLength,\r
361 IN OUT VOID *Data,\r
362 IN OUT UINTN *DataLength,\r
363 IN OUT UINT8 *DataToggle,\r
364 IN UINTN TimeOut,\r
365 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
366 OUT UINT32 *TransferResult\r
367 )\r
368;\r
369\r
370#define EFI_USB_MAX_ISO_BUFFER_NUM 7\r
371#define EFI_USB_MAX_ISO_BUFFER_NUM1 2\r
372\r
373/**\r
374 Submits isochronous transfer to an isochronous endpoint of a USB device.\r
375\r
376 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
377 @param DeviceAddress Represents the address of the target device on the USB.\r
378 @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r
379 target USB device.\r
380 @param DeviceSpeed Indicates device speed.\r
381 @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r
382 sending or receiving.\r
383 @param DataBuffersNumber Number of data buffers prepared for the transfer.\r
384 @param Data Array of pointers to the buffers of data that will be transmitted to USB\r
385 device or received from USB device.\r
386 @param DataLength Specifies the length, in bytes, of the data to be sent to or received from\r
387 the USB device.\r
388 @param Translator A pointer to the transaction translator data.\r
389 @param TransferResult A pointer to the detailed result information of the isochronous transfer.\r
390\r
391 @retval EFI_SUCCESS The isochronous transfer was completed successfully.\r
392 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
393 @retval EFI_OUT_OF_RESOURCES The isochronous transfer could not be submitted due to a lack of resources.\r
394 @retval EFI_TIMEOUT The isochronous transfer cannot be completed within the one USB frame time.\r
395 @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.\r
396 Caller should check TransferResult for detailed error information.\r
397\r
398**/\r
399typedef\r
400EFI_STATUS\r
401(EFIAPI *EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER) (\r
402 IN EFI_USB2_HC_PROTOCOL *This,\r
403 IN UINT8 DeviceAddress,\r
404 IN UINT8 EndPointAddress,\r
405 IN UINT8 DeviceSpeed,\r
406 IN UINTN MaximumPacketLength,\r
407 IN UINT8 DataBuffersNumber,\r
408 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
409 IN UINTN DataLength,\r
410 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
411 OUT UINT32 *TransferResult\r
412 )\r
413;\r
414\r
415/**\r
416 Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.\r
417\r
418 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
419 @param DeviceAddress Represents the address of the target device on the USB.\r
420 @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r
421 target USB device.\r
422 @param DeviceSpeed Indicates device speed.\r
423 @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r
424 sending or receiving.\r
425 @param DataBuffersNumber Number of data buffers prepared for the transfer.\r
426 @param Data Array of pointers to the buffers of data that will be transmitted to USB\r
427 device or received from USB device.\r
428 @param DataLength Specifies the length, in bytes, of the data to be sent to or received from\r
429 the USB device.\r
430 @param Translator A pointer to the transaction translator data.\r
431 @param IsochronousCallback The Callback function. This function is called if the requested\r
432 isochronous transfer is completed.\r
433 @param Context Data passed to the IsochronousCallback function. This is an\r
434 optional parameter and may be NULL.\r
435\r
436 @retval EFI_SUCCESS The asynchronous isochronous transfer request has been successfully\r
437 submitted or canceled.\r
438 @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
439 @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous transfer could not be submitted due to\r
440 a lack of resources.\r
441\r
442**/\r
443typedef\r
444EFI_STATUS\r
445(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER) (\r
446 IN EFI_USB2_HC_PROTOCOL *This,\r
447 IN UINT8 DeviceAddress,\r
448 IN UINT8 EndPointAddress,\r
449 IN UINT8 DeviceSpeed,\r
450 IN UINTN MaximumPacketLength,\r
451 IN UINT8 DataBuffersNumber,\r
452 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
453 IN UINTN DataLength,\r
454 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
455 IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r
456 IN VOID *Context OPTIONAL\r
457 )\r
458;\r
459\r
460/**\r
461 Retrieves the current status of a USB root hub port.\r
462\r
463 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
464 @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r
465 This value is zero based.\r
466 @param PortStatus A pointer to the current port status bits and port status change bits.\r
467\r
468 @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber\r
469 was returned in PortStatus.\r
470 @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r
471\r
472**/\r
473typedef\r
474EFI_STATUS\r
475(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS) (\r
476 IN CONST EFI_USB2_HC_PROTOCOL *This,\r
477 IN CONST UINT8 PortNumber,\r
478 OUT EFI_USB_PORT_STATUS *PortStatus\r
479 )\r
480; \r
481\r
482/**\r
483 Sets a feature for the specified root hub port.\r
484\r
485 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
486 @param PortNumber Specifies the root hub port whose feature is requested to be set. This\r
487 value is zero based.\r
488 @param PortFeature Indicates the feature selector associated with the feature set request.\r
489\r
490 @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB\r
491 root hub port specified by PortNumber.\r
492 @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r
493\r
494**/\r
495typedef\r
496EFI_STATUS\r
497(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE) (\r
498 IN EFI_USB2_HC_PROTOCOL *This,\r
499 IN UINT8 PortNumber,\r
500 IN EFI_USB_PORT_FEATURE PortFeature\r
501 )\r
502; \r
503\r
504/**\r
505 Clears a feature for the specified root hub port.\r
506\r
507 @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
508 @param PortNumber Specifies the root hub port whose feature is requested to be cleared. This\r
509 value is zero based.\r
510 @param PortFeature Indicates the feature selector associated with the feature clear request.\r
511\r
512 @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB\r
513 root hub port specified by PortNumber.\r
514 @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r
515\r
516**/\r
517typedef\r
518EFI_STATUS\r
519(EFIAPI *EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE) (\r
520 IN EFI_USB2_HC_PROTOCOL *This,\r
521 IN UINT8 PortNumber,\r
522 IN EFI_USB_PORT_FEATURE PortFeature\r
523 )\r
524; \r
525\r
526struct _EFI_USB2_HC_PROTOCOL {\r
527 EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability;\r
528 EFI_USB2_HC_PROTOCOL_RESET Reset;\r
529 EFI_USB2_HC_PROTOCOL_GET_STATE GetState;\r
530 EFI_USB2_HC_PROTOCOL_SET_STATE SetState;\r
531 EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;\r
532 EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;\r
533 EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;\r
534 EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;\r
535 EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;\r
536 EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;\r
537 EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;\r
538 EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;\r
539 EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;\r
540 UINT16 MajorRevision;\r
541 UINT16 MinorRevision;\r
542};\r
543\r
544extern EFI_GUID gEfiUsb2HcProtocolGuid;\r
545\r
546#endif\r