2 * Copyright 2001-2008 Texas Instruments - http://www.ti.com/
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * ======== _dbdebug.h ========
20 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
22 * This is private header file to define the debug zones. This is
29 *! 29-Nov-2000 rr: Name changed to _ddspdebug.h and this header changed to
30 *! TISB Coding standard.
42 /* Enable/Disable user API print messages in Linux */
43 #define DSPAPI_ZONE_INIT 0x0
44 #define DSPAPI_ZONE_MGR 0x1
45 #define DSPAPI_ZONE_PROC 0x2
46 #define DSPAPI_ZONE_NODE 0x3
47 #define DSPAPI_ZONE_STREAM 0x4
48 #define DSPAPI_ZONE_TEST 0x5
49 #define DSPAPI_ZONE_FUNCTION 0xd
50 #define DSPAPI_ZONE_WARNING 0xe
51 #define DSPAPI_ZONE_ERROR 0xf
52 #define DSPAPI_DEBUG_NONE 0xff
54 /* statically configure debug level */
55 #ifdef DDSP_DEBUG_PRODUCT
56 #define DSPAPI_DEBUG_LEVEL DSPAPI_ZONE_WARNING
57 #else /* default debug level */
58 #define DSPAPI_DEBUG_LEVEL DSPAPI_ZONE_WARNING
61 #define DEBUGMSG(x,y) if(x >= DSPAPI_DEBUG_LEVEL) printf(y)
63 #else /* ifdef LINUX */
66 * DEBUG macro support.
70 #define DSPAPI_ZONE_ID_INIT 0x0
71 #define DSPAPI_ZONE_ID_MGR 0x1
72 #define DSPAPI_ZONE_ID_PROC 0x2
73 #define DSPAPI_ZONE_ID_NODE 0x3
74 #define DSPAPI_ZONE_ID_STREAM 0x4
75 #define DSPAPI_ZONE_ID_TEST 0x5
76 #define DSPAPI_ZONE_ID_FUNCTION 0xd
77 #define DSPAPI_ZONE_ID_WARNING 0xe
78 #define DSPAPI_ZONE_ID_ERROR 0xf
80 #define DSPAPI_ZONE_MASK_INIT ( 0x1 << DSPAPI_ZONE_ID_INIT )
81 #define DSPAPI_ZONE_MASK_MGR ( 0x1 << DSPAPI_ZONE_ID_MGR )
82 #define DSPAPI_ZONE_MASK_PROC ( 0x1 << DSPAPI_ZONE_ID_PROC )
83 #define DSPAPI_ZONE_MASK_NODE ( 0x1 << DSPAPI_ZONE_ID_NODE )
84 #define DSPAPI_ZONE_MASK_STREAM ( 0x1 << DSPAPI_ZONE_ID_STREAM )
85 #define DSPAPI_ZONE_MASK_TEST ( 0x1 << DSPAPI_ZONE_ID_TEST )
86 #define DSPAPI_ZONE_MASK_FUNCTION ( 0x1 << DSPAPI_ZONE_ID_FUNCTION )
87 #define DSPAPI_ZONE_MASK_WARNING ( 0x1 << DSPAPI_ZONE_ID_WARNING )
88 #define DSPAPI_ZONE_MASK_ERROR ( 0x1 << DSPAPI_ZONE_ID_ERROR )
90 #define DSPAPI_ZONE_INIT DEBUGZONE( DSPAPI_ZONE_ID_INIT )
91 #define DSPAPI_ZONE_MGR DEBUGZONE( DSPAPI_ZONE_ID_MGR )
92 #define DSPAPI_ZONE_PROC DEBUGZONE( DSPAPI_ZONE_ID_PROC )
93 #define DSPAPI_ZONE_NODE DEBUGZONE( DSPAPI_ZONE_ID_NODE )
94 #define DSPAPI_ZONE_STREAM DEBUGZONE( DSPAPI_ZONE_ID_STREAM )
95 #define DSPAPI_ZONE_TEST DEBUGZONE( DSPAPI_ZONE_ID_TEST )
96 #define DSPAPI_ZONE_FUNCTION DEBUGZONE( DSPAPI_ZONE_ID_FUNCTION )
97 #define DSPAPI_ZONE_WARNING DEBUGZONE( DSPAPI_ZONE_ID_WARNING )
98 #define DSPAPI_ZONE_ERROR DEBUGZONE( DSPAPI_ZONE_ID_ERROR )
102 #endif /* ifdef LINUX */
107 #endif /* _DBDEBUG_ */