3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 This file contains the definination for host controller schedule routines
24 #ifndef _EFI_EHCI_SCHED_H_
25 #define _EFI_EHCI_SCHED_H_
35 Initialize the schedule data structure such as frame list
39 Ehc - The EHCI device to init schedule data for
43 EFI_OUT_OF_RESOURCES - Failed to allocate resource to init schedule data
44 EFI_SUCCESS - The schedule data is initialized
52 Free the schedule data. It may be partially initialized.
54 @param Ehc The EHCI device
68 Link the queue head to the asynchronous schedule list.
69 UEFI only supports one CTRL/BULK transfer at a time
70 due to its interfaces. This simplifies the AsynList
71 management: A reclamation header is always linked to
72 the AsyncListAddr, the only active QH is appended to it.
74 @param Ehc The EHCI device
75 @param Qh The queue head to link
89 Unlink a queue head from the asynchronous schedule list.
90 Need to synchronize with hardware
92 @param Ehc The EHCI device
93 @param Qh The queue head to unlink
99 EhcUnlinkQhFromAsync (
107 Link a queue head for interrupt transfer to the periodic
108 schedule frame list. This code is very much the same as
111 @param Ehc The EHCI device
112 @param Qh The queue head to link
126 Unlink an interrupt queue head from the periodic
129 @param Ehc The EHCI device
130 @param Qh The queue head to unlink
136 EhcUnlinkQhFromPeriod (
145 Execute the transfer by polling the URB. This is a synchronous operation.
147 @param Ehc The EHCI device
148 @param Urb The URB to execute
149 @param TimeOut The time to wait before abort, in millisecond.
151 @return EFI_DEVICE_ERROR : The transfer failed due to transfer error
152 @return EFI_TIMEOUT : The transfer failed due to time out
153 @return EFI_SUCCESS : The transfer finished OK
166 Delete a single asynchronous interrupt transfer for
167 the device and endpoint
169 @param Ehc The EHCI device
170 @param DevAddr The address of the target device
171 @param EpNum The endpoint of the target
172 @param DataToggle Return the next data toggle to use
174 @retval EFI_SUCCESS An asynchronous transfer is removed
175 @retval EFI_NOT_FOUND No transfer for the device is found
179 EhciDelAsyncIntTransfer (
183 OUT UINT8
*DataToggle
189 Remove all the asynchronous interrutp transfers
191 @param Ehc The EHCI device
197 EhciDelAllAsyncIntTransfers (
205 Interrupt transfer periodic check handler
207 @param Event Interrupt event
208 @param Context Pointer to USB2_HC_DEV
214 EhcMoniteAsyncRequests (