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