]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
Save original PCI attributes in start() function and restore it in Stop() for those...
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / EhciDebug.h
CommitLineData
913cb9dc 1/** @file\r
2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 EhciDebug.h\r
15\r
16Abstract:\r
17\r
18 This file contains the definination for host controller debug support routines\r
19\r
20Revision History\r
21\r
22**/\r
23\r
24#ifndef _EFI_EHCI_DEBUG_H_\r
25#define _EFI_EHCI_DEBUG_H_\r
26\r
27\r
28enum {\r
29 USB_DEBUG_FORCE_OUTPUT = (UINTN)(1 << 0),\r
30\r
31 EHC_DEBUG_QH = (UINTN)(1 << 8),\r
32 EHC_DEBUG_QTD = (UINTN)(1 << 9),\r
c52fa98c 33 EHC_DEBUG_BUF = (UINTN)(1 << 10)\r
913cb9dc 34};\r
35\r
36\r
37/**\r
38 EHCI's debug output function. It determines whether\r
39 to output by the mask and level\r
40\r
41 @param Level The output level\r
42 @param Format The format parameters to the print\r
43 @param ... The variable length parameters after format\r
44\r
45 @return None\r
46\r
47**/\r
48VOID\r
49EhciDebugPrint (\r
50 IN UINTN Level,\r
51 IN CHAR8 *Format,\r
52 ...\r
53 )\r
54;\r
55\r
56\r
57/**\r
58 EHCI's debug output function. It determines whether\r
59 to output by the mask and level\r
60\r
61 @param Format The format parameters to the print\r
62 @param ... The variable length parameters after format\r
63\r
64 @return None\r
65\r
66**/\r
67VOID\r
68EhcDebug (\r
69 IN CHAR8 *Format,\r
70 ...\r
71 )\r
72;\r
73\r
74\r
75\r
76/**\r
77 EHCI's error output function. It determines whether\r
78 to output by the mask and level\r
79\r
80 @param Format The format parameters to the print\r
81 @param ... The variable length parameters after format\r
82\r
83 @return None\r
84\r
85**/\r
86VOID\r
87EhcError (\r
88 IN CHAR8 *Format,\r
89 ...\r
90 )\r
91;\r
92\r
93\r
94\r
95/**\r
96 Dump the fields of a QTD\r
97\r
98 @param Qtd The QTD to dump\r
99 @param Msg The message to print before the dump\r
100\r
101 @return None\r
102\r
103**/\r
104VOID\r
105EhcDumpQtd (\r
106 IN EHC_QTD *Qtd,\r
107 IN UINT8 *Msg\r
108 )\r
109;\r
110\r
111\r
112\r
113/**\r
114 Dump the queue head\r
115\r
116 @param Qh The queue head to dump\r
117 @param Msg The message to print before the dump\r
118 @param DumpBuf Whether to dump the memory buffer of the associated QTD\r
119\r
120 @return None\r
121\r
122**/\r
123VOID\r
124EhcDumpQh (\r
125 IN EHC_QH *Qh,\r
126 IN UINT8 *Msg,\r
127 IN BOOLEAN DumpBuf\r
128 )\r
129;\r
130\r
131\r
132\r
133/**\r
134 Dump the buffer in the form of hex\r
135\r
136 @param Buf The buffer to dump\r
137 @param Len The length of buffer\r
138\r
139 @return None\r
140\r
141**/\r
142VOID\r
143EhcDumpBuf (\r
144 IN UINT8 *Buf,\r
145 IN UINTN Len\r
146 )\r
147;\r
148\r
149#ifdef EFI_DEBUG\r
150 #define EHC_DEBUG(arg) EhcDebug arg\r
151 #define EHC_ERROR(arg) EhcError arg\r
152 #define EHC_DUMP_QH(arg) EhcDumpQh arg\r
50fa1b3a 153 #define EHC_DUMP_QTD(arg) EhcDumpQtd arg\r
154 #define EHC_DUMP_BUF(arg) EhcDumpBuf arg\r
913cb9dc 155#else\r
156 #define EHC_DEBUG(arg)\r
157 #define EHC_ERROR(arg)\r
158 #define EHC_DUMP_QH(arg)\r
50fa1b3a 159 #define EHC_DUMP_QTD(arg)\r
160 #define EHC_DUMP_BUF(arg)\r
913cb9dc 161#endif\r
162\r
163#endif\r