--- /dev/null
+/** @file\r
+This file contains the definination for host controller schedule routines.\r
+\r
+Copyright (c) 2013-2015 Intel Corporation.\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+\r
+#ifndef _OHCI_SCHED_H\r
+#define _OHCI_SCHED_H\r
+\r
+#include "Descriptor.h"\r
+\r
+#define HCCA_MEM_SIZE 256\r
+#define GRID_SIZE 16\r
+#define GRID_SHIFT 4\r
+\r
+/**\r
+\r
+ Convert Error code from OHCI format to EFI format\r
+\r
+ @Param ErrorCode ErrorCode in OHCI format\r
+\r
+ @retval ErrorCode in EFI format\r
+\r
+**/\r
+UINT32\r
+ConvertErrorCode (\r
+ IN UINT32 ErrorCode\r
+ );\r
+/**\r
+\r
+ Check TDs Results\r
+\r
+ @Param Ohc UHC private data\r
+ @Param Td TD_DESCRIPTOR\r
+ @Param Result Result to return\r
+\r
+ @retval TRUE means OK\r
+ @retval FLASE means Error or Short packet\r
+\r
+**/\r
+BOOLEAN\r
+OhciCheckTDsResults (\r
+ IN USB_OHCI_HC_DEV *Ohc,\r
+ IN TD_DESCRIPTOR *Td,\r
+ OUT UINT32 *Result\r
+ );\r
+/**\r
+\r
+ Check the task status on an ED\r
+\r
+ @Param Ed Pointer to the ED task that TD hooked on\r
+ @Param HeadTd TD header for current transaction\r
+\r
+ @retval Task Status Code\r
+\r
+**/\r
+\r
+UINT32\r
+CheckEDStatus (\r
+ IN ED_DESCRIPTOR *Ed,\r
+ IN TD_DESCRIPTOR *HeadTd\r
+ );\r
+/**\r
+\r
+ Check the task status\r
+\r
+ @Param Ohc UHC private data\r
+ @Param ListType Pipe type\r
+ @Param Ed Pointer to the ED task hooked on\r
+ @Param HeadTd Head of TD corresponding to the task\r
+ @Param ErrorCode return the ErrorCode\r
+\r
+ @retval EFI_SUCCESS Task done\r
+ @retval EFI_NOT_READY Task on processing\r
+ @retval EFI_DEVICE_ERROR Some error occured\r
+\r
+**/\r
+EFI_STATUS\r
+CheckIfDone (\r
+ IN USB_OHCI_HC_DEV *Ohc,\r
+ IN DESCRIPTOR_LIST_TYPE ListType,\r
+ IN ED_DESCRIPTOR *Ed,\r
+ IN TD_DESCRIPTOR *HeadTd,\r
+ OUT UINT32 *ErrorCode\r
+ );\r
+/**\r
+\r
+ Convert TD condition code to Efi Status\r
+\r
+ @Param ConditionCode Condition code to convert\r
+\r
+ @retval EFI_SUCCESS No error occured\r
+ @retval EFI_NOT_READY TD still on processing\r
+ @retval EFI_DEVICE_ERROR Error occured in processing TD\r
+\r
+**/\r
+\r
+EFI_STATUS\r
+OhciTDConditionCodeToStatus (\r
+ IN UINT32 ConditionCode\r
+ );\r
+\r
+#endif\r