]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/npe/include/IxEthDBLog_p.h
Merge 'u-boot-microblaze/zynq' into (u-boot-arm/master'
[karo-tx-uboot.git] / drivers / net / npe / include / IxEthDBLog_p.h
1 /**
2  * @file IxEthDBLog_p.h
3  *
4  * @brief definitions of log macros and log configuration
5  * 
6  * @par
7  * IXP400 SW Release version 2.0
8  * 
9  * -- Copyright Notice --
10  * 
11  * @par
12  * Copyright 2001-2005, Intel Corporation.
13  * All rights reserved.
14  * 
15  * @par
16  * SPDX-License-Identifier:     BSD-3-Clause
17  * @par
18  * -- End of Copyright Notice --
19  */
20
21 #include <IxOsal.h>
22
23 #ifdef IX_UNIT_TEST
24 #define NULL_PRINT_ROUTINE(format, arg...) /* nothing */
25 #else
26 #define NULL_PRINT_ROUTINE if(0) printf
27 #endif
28
29 /***************************************************
30  *                 Globals                         *
31  ***************************************************/
32 /* safe to permanently leave these on */
33 #define HAS_ERROR_LOG
34 #define HAS_ERROR_IRQ_LOG
35 #define HAS_WARNING_LOG
36
37 /***************************************************
38  *              Log Configuration                  *
39  ***************************************************/
40
41 /* debug output can be turned on unless specifically
42    declared as a non-debug build */
43 #ifndef NDEBUG
44
45 #undef HAS_EVENTS_TRACE
46 #undef HAS_EVENTS_VERBOSE_TRACE
47
48 #undef HAS_SUPPORT_TRACE
49 #undef HAS_SUPPORT_VERBOSE_TRACE
50
51 #undef HAS_NPE_TRACE
52 #undef HAS_NPE_VERBOSE_TRACE
53 #undef HAS_DUMP_NPE_TREE
54
55 #undef HAS_UPDATE_TRACE
56 #undef HAS_UPDATE_VERBOSE_TRACE
57
58 #endif /* NDEBUG */
59
60
61 /***************************************************
62  *              Log Macros                         *
63  ***************************************************/
64
65 /************** Globals ******************/
66
67 #ifdef HAS_ERROR_LOG
68
69     #define ERROR_LOG printf
70
71 #else
72
73     #define ERROR_LOG NULL_PRINT_ROUTINE
74
75 #endif
76
77 #ifdef HAS_ERROR_IRQ_LOG
78
79     #define ERROR_IRQ_LOG(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
80
81 #else
82
83     #define ERROR_IRQ_LOG(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
84
85 #endif
86
87 #ifdef HAS_WARNING_LOG
88
89     #define WARNING_LOG printf
90
91 #else
92
93     #define WARNING_LOG NULL_PRINT_ROUTINE
94
95 #endif
96
97 /************** Events *******************/
98
99 #ifdef HAS_EVENTS_TRACE
100
101     #define IX_ETH_DB_EVENTS_TRACE     printf
102     #define IX_ETH_DB_IRQ_EVENTS_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
103
104     #ifdef HAS_EVENTS_VERBOSE_TRACE
105
106         #define IX_ETH_DB_EVENTS_VERBOSE_TRACE printf
107     
108     #else
109
110         #define IX_ETH_DB_EVENTS_VERBOSE_TRACE NULL_PRINT_ROUTINE
111
112     #endif /* HAS_EVENTS_VERBOSE_TRACE */
113
114 #else
115
116     #define IX_ETH_DB_EVENTS_TRACE         NULL_PRINT_ROUTINE
117     #define IX_ETH_DB_EVENTS_VERBOSE_TRACE NULL_PRINT_ROUTINE
118     #define IX_ETH_DB_IRQ_EVENTS_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
119
120 #endif /* HAS_EVENTS_TRACE */
121
122 /************** Support *******************/
123
124 #ifdef HAS_SUPPORT_TRACE
125
126     #define IX_ETH_DB_SUPPORT_TRACE     printf
127     #define IX_ETH_DB_SUPPORT_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
128
129     #ifdef HAS_SUPPORT_VERBOSE_TRACE
130
131         #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE printf
132
133     #else
134
135         #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE NULL_PRINT_ROUTINE
136
137     #endif /* HAS_SUPPORT_VERBOSE_TRACE */
138
139 #else
140
141     #define IX_ETH_DB_SUPPORT_TRACE         NULL_PRINT_ROUTINE
142     #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE NULL_PRINT_ROUTINE
143     #define IX_ETH_DB_SUPPORT_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
144
145 #endif /* HAS_SUPPORT_TRACE */
146
147 /************** NPE Adaptor *******************/
148
149 #ifdef HAS_NPE_TRACE
150
151     #define IX_ETH_DB_NPE_TRACE     printf
152     #define IX_ETH_DB_NPE_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
153
154     #ifdef HAS_NPE_VERBOSE_TRACE
155
156         #define IX_ETH_DB_NPE_VERBOSE_TRACE printf
157
158     #else
159
160         #define IX_ETH_DB_NPE_VERBOSE_TRACE NULL_PRINT_ROUTINE
161
162     #endif /* HAS_NPE_VERBOSE_TRACE */
163
164 #else
165
166     #define IX_ETH_DB_NPE_TRACE         NULL_PRINT_ROUTINE
167     #define IX_ETH_DB_NPE_VERBOSE_TRACE NULL_PRINT_ROUTINE
168     #define IX_ETH_DB_NPE_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
169
170 #endif /* HAS_NPE_TRACE */
171
172 #ifdef HAS_DUMP_NPE_TREE
173
174 #define IX_ETH_DB_NPE_DUMP_ELT(eltBaseAddress, eltSize) ixEthELTDumpTree(eltBaseAddress, eltSize)
175
176 #else
177
178 #define IX_ETH_DB_NPE_DUMP_ELT(eltBaseAddress, eltSize) /* nothing */
179
180 #endif /* HAS_DUMP_NPE_TREE */
181
182 /************** Port Update *******************/
183
184 #ifdef HAS_UPDATE_TRACE
185
186     #define IX_ETH_DB_UPDATE_TRACE printf
187
188     #ifdef HAS_UPDATE_VERBOSE_TRACE
189
190         #define IX_ETH_DB_UPDATE_VERBOSE_TRACE printf
191
192     #else
193
194         #define IX_ETH_DB_UPDATE_VERBOSE_TRACE NULL_PRINT_ROUTINE
195
196     #endif
197
198 #else /* HAS_UPDATE_VERBOSE_TRACE */
199
200     #define IX_ETH_DB_UPDATE_TRACE         NULL_PRINT_ROUTINE
201     #define IX_ETH_DB_UPDATE_VERBOSE_TRACE NULL_PRINT_ROUTINE
202
203 #endif /* HAS_UPDATE_TRACE */