]> git.proxmox.com Git - mirror_edk2.git/blame - QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Pei/OhciSched.h
QuarkSocPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / QuarkSocPkg / QuarkSouthCluster / Usb / Ohci / Pei / OhciSched.h
CommitLineData
9b6bbcdb
MK
1/** @file\r
2This file contains the definination for host controller schedule routines.\r
3\r
4Copyright (c) 2013-2015 Intel Corporation.\r
5\r
c9f231d0 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
9b6bbcdb
MK
7\r
8**/\r
9\r
10\r
11\r
12#ifndef _OHCI_SCHED_H\r
13#define _OHCI_SCHED_H\r
14\r
15#include "Descriptor.h"\r
16\r
17#define HCCA_MEM_SIZE 256\r
18#define GRID_SIZE 16\r
19#define GRID_SHIFT 4\r
20\r
21/**\r
22\r
23 Convert Error code from OHCI format to EFI format\r
24\r
25 @Param ErrorCode ErrorCode in OHCI format\r
26\r
27 @retval ErrorCode in EFI format\r
28\r
29**/\r
30UINT32\r
31ConvertErrorCode (\r
32 IN UINT32 ErrorCode\r
33 );\r
34/**\r
35\r
36 Check TDs Results\r
37\r
38 @Param Ohc UHC private data\r
39 @Param Td TD_DESCRIPTOR\r
40 @Param Result Result to return\r
41\r
42 @retval TRUE means OK\r
43 @retval FLASE means Error or Short packet\r
44\r
45**/\r
46BOOLEAN\r
47OhciCheckTDsResults (\r
48 IN USB_OHCI_HC_DEV *Ohc,\r
49 IN TD_DESCRIPTOR *Td,\r
50 OUT UINT32 *Result\r
51 );\r
52/**\r
53\r
54 Check the task status on an ED\r
55\r
56 @Param Ed Pointer to the ED task that TD hooked on\r
57 @Param HeadTd TD header for current transaction\r
58\r
59 @retval Task Status Code\r
60\r
61**/\r
62\r
63UINT32\r
64CheckEDStatus (\r
65 IN ED_DESCRIPTOR *Ed,\r
66 IN TD_DESCRIPTOR *HeadTd\r
67 );\r
68/**\r
69\r
70 Check the task status\r
71\r
72 @Param Ohc UHC private data\r
73 @Param ListType Pipe type\r
74 @Param Ed Pointer to the ED task hooked on\r
75 @Param HeadTd Head of TD corresponding to the task\r
76 @Param ErrorCode return the ErrorCode\r
77\r
78 @retval EFI_SUCCESS Task done\r
79 @retval EFI_NOT_READY Task on processing\r
80 @retval EFI_DEVICE_ERROR Some error occured\r
81\r
82**/\r
83EFI_STATUS\r
84CheckIfDone (\r
85 IN USB_OHCI_HC_DEV *Ohc,\r
86 IN DESCRIPTOR_LIST_TYPE ListType,\r
87 IN ED_DESCRIPTOR *Ed,\r
88 IN TD_DESCRIPTOR *HeadTd,\r
89 OUT UINT32 *ErrorCode\r
90 );\r
91/**\r
92\r
93 Convert TD condition code to Efi Status\r
94\r
95 @Param ConditionCode Condition code to convert\r
96\r
97 @retval EFI_SUCCESS No error occured\r
98 @retval EFI_NOT_READY TD still on processing\r
99 @retval EFI_DEVICE_ERROR Error occured in processing TD\r
100\r
101**/\r
102\r
103EFI_STATUS\r
104OhciTDConditionCodeToStatus (\r
105 IN UINT32 ConditionCode\r
106 );\r
107\r
108#endif\r