]>
Commit | Line | Data |
---|---|---|
4b1bf81c | 1 | /** @file\r |
2 | Private Header file for Usb Host Controller PEIM\r | |
3 | \r | |
d1102dba LG |
4 | Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r |
5 | \r | |
9d510e61 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
4b1bf81c | 7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef _EFI_EHCI_SCHED_H_\r | |
11 | #define _EFI_EHCI_SCHED_H_\r | |
12 | \r | |
13 | /**\r | |
14 | Initialize the schedule data structure such as frame list.\r | |
d1102dba | 15 | \r |
4b1bf81c | 16 | @param Ehc The EHCI device to init schedule data for.\r |
17 | \r | |
18 | @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to init schedule data.\r | |
19 | @retval EFI_SUCCESS The schedule data is initialized.\r | |
20 | \r | |
21 | **/\r | |
22 | EFI_STATUS\r | |
23 | EhcInitSched (\r | |
24 | IN PEI_USB2_HC_DEV *Ehc\r | |
25 | )\r | |
26 | ;\r | |
27 | \r | |
28 | /**\r | |
29 | Free the schedule data. It may be partially initialized.\r | |
d1102dba | 30 | \r |
4b1bf81c | 31 | @param Ehc The EHCI device.\r |
32 | \r | |
33 | **/\r | |
34 | VOID\r | |
35 | EhcFreeSched (\r | |
36 | IN PEI_USB2_HC_DEV *Ehc\r | |
37 | )\r | |
38 | ;\r | |
39 | \r | |
40 | /**\r | |
41 | Link the queue head to the asynchronous schedule list.\r | |
42 | UEFI only supports one CTRL/BULK transfer at a time\r | |
43 | due to its interfaces. This simplifies the AsynList\r | |
44 | management: A reclamation header is always linked to\r | |
45 | the AsyncListAddr, the only active QH is appended to it.\r | |
d1102dba | 46 | \r |
4b1bf81c | 47 | @param Ehc The EHCI device.\r |
48 | @param Qh The queue head to link.\r | |
49 | \r | |
50 | **/\r | |
51 | VOID\r | |
52 | EhcLinkQhToAsync (\r | |
53 | IN PEI_USB2_HC_DEV *Ehc,\r | |
54 | IN PEI_EHC_QH *Qh\r | |
55 | )\r | |
56 | ;\r | |
57 | \r | |
58 | /**\r | |
59 | Unlink a queue head from the asynchronous schedule list.\r | |
60 | Need to synchronize with hardware.\r | |
d1102dba | 61 | \r |
4b1bf81c | 62 | @param Ehc The EHCI device.\r |
63 | @param Qh The queue head to unlink.\r | |
64 | \r | |
65 | **/\r | |
66 | VOID\r | |
67 | EhcUnlinkQhFromAsync (\r | |
68 | IN PEI_USB2_HC_DEV *Ehc,\r | |
69 | IN PEI_EHC_QH *Qh\r | |
70 | )\r | |
71 | ;\r | |
72 | \r | |
4b1bf81c | 73 | /**\r |
74 | Execute the transfer by polling the URB. This is a synchronous operation.\r | |
d1102dba | 75 | \r |
4b1bf81c | 76 | @param Ehc The EHCI device.\r |
77 | @param Urb The URB to execute.\r | |
78 | @param TimeOut The time to wait before abort, in millisecond.\r | |
79 | \r | |
80 | @retval EFI_DEVICE_ERROR The transfer failed due to transfer error.\r | |
81 | @retval EFI_TIMEOUT The transfer failed due to time out.\r | |
82 | @retval EFI_SUCCESS The transfer finished OK.\r | |
83 | \r | |
84 | **/\r | |
85 | EFI_STATUS\r | |
86 | EhcExecTransfer (\r | |
87 | IN PEI_USB2_HC_DEV *Ehc,\r | |
88 | IN PEI_URB *Urb,\r | |
89 | IN UINTN TimeOut\r | |
90 | )\r | |
91 | ;\r | |
92 | \r | |
4b1bf81c | 93 | #endif\r |