]>
Commit | Line | Data |
---|---|---|
4b1bf81c | 1 | /** @file\r |
2 | Private Header file for Usb Host Controller PEIM\r | |
3 | \r | |
008d2542 | 4 | Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r |
4b1bf81c | 5 | \r |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions\r | |
8 | of the BSD License which accompanies this distribution. The\r | |
9 | full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef _EFI_EHCI_SCHED_H_\r | |
18 | #define _EFI_EHCI_SCHED_H_\r | |
19 | \r | |
20 | /**\r | |
21 | Initialize the schedule data structure such as frame list.\r | |
22 | \r | |
23 | @param Ehc The EHCI device to init schedule data for.\r | |
24 | \r | |
25 | @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to init schedule data.\r | |
26 | @retval EFI_SUCCESS The schedule data is initialized.\r | |
27 | \r | |
28 | **/\r | |
29 | EFI_STATUS\r | |
30 | EhcInitSched (\r | |
31 | IN PEI_USB2_HC_DEV *Ehc\r | |
32 | )\r | |
33 | ;\r | |
34 | \r | |
35 | /**\r | |
36 | Free the schedule data. It may be partially initialized.\r | |
37 | \r | |
38 | @param Ehc The EHCI device.\r | |
39 | \r | |
40 | **/\r | |
41 | VOID\r | |
42 | EhcFreeSched (\r | |
43 | IN PEI_USB2_HC_DEV *Ehc\r | |
44 | )\r | |
45 | ;\r | |
46 | \r | |
47 | /**\r | |
48 | Link the queue head to the asynchronous schedule list.\r | |
49 | UEFI only supports one CTRL/BULK transfer at a time\r | |
50 | due to its interfaces. This simplifies the AsynList\r | |
51 | management: A reclamation header is always linked to\r | |
52 | the AsyncListAddr, the only active QH is appended to it.\r | |
53 | \r | |
54 | @param Ehc The EHCI device.\r | |
55 | @param Qh The queue head to link.\r | |
56 | \r | |
57 | **/\r | |
58 | VOID\r | |
59 | EhcLinkQhToAsync (\r | |
60 | IN PEI_USB2_HC_DEV *Ehc,\r | |
61 | IN PEI_EHC_QH *Qh\r | |
62 | )\r | |
63 | ;\r | |
64 | \r | |
65 | /**\r | |
66 | Unlink a queue head from the asynchronous schedule list.\r | |
67 | Need to synchronize with hardware.\r | |
68 | \r | |
69 | @param Ehc The EHCI device.\r | |
70 | @param Qh The queue head to unlink.\r | |
71 | \r | |
72 | **/\r | |
73 | VOID\r | |
74 | EhcUnlinkQhFromAsync (\r | |
75 | IN PEI_USB2_HC_DEV *Ehc,\r | |
76 | IN PEI_EHC_QH *Qh\r | |
77 | )\r | |
78 | ;\r | |
79 | \r | |
4b1bf81c | 80 | /**\r |
81 | Execute the transfer by polling the URB. This is a synchronous operation.\r | |
82 | \r | |
83 | @param Ehc The EHCI device.\r | |
84 | @param Urb The URB to execute.\r | |
85 | @param TimeOut The time to wait before abort, in millisecond.\r | |
86 | \r | |
87 | @retval EFI_DEVICE_ERROR The transfer failed due to transfer error.\r | |
88 | @retval EFI_TIMEOUT The transfer failed due to time out.\r | |
89 | @retval EFI_SUCCESS The transfer finished OK.\r | |
90 | \r | |
91 | **/\r | |
92 | EFI_STATUS\r | |
93 | EhcExecTransfer (\r | |
94 | IN PEI_USB2_HC_DEV *Ehc,\r | |
95 | IN PEI_URB *Urb,\r | |
96 | IN UINTN TimeOut\r | |
97 | )\r | |
98 | ;\r | |
99 | \r | |
4b1bf81c | 100 | #endif\r |