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