xref: /freebsd/sys/dev/pms/RefTisa/tisa/api/tiglobal.h (revision edf8578117e8844e02c0121147f45e4609b30680)
1 /*******************************************************************************
2  *Copyright (c) 2014 PMC-Sierra, Inc.  All rights reserved.
3 *
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7 *following disclaimer.
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
11 *
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20 *
21 *
22  ********************************************************************************/
23 /********************************************************************************
24  **
25  **   tiglobal.h
26  **
27  **   Abstract:
28  **
29  ********************************************************************************/
30 
31 
32 #ifndef TIGLOBAL_H
33 #define TIGLOBAL_H
34 
35 #include <dev/pms/freebsd/driver/common/osenv.h>
36 #include <dev/pms/freebsd/driver/common/ostypes.h>
37 #include <dev/pms/freebsd/driver/common/osdebug.h>
38 
39 #ifndef TIDEBUG_MSG
40 #define TIDEBUG_MSG(mask, val, format)
41 #endif
42 
43 extern bit32 gTiDebugLevel;
44 
45 #define TI_DBG0(a)    TIDEBUG_MSG0(a) /* always print */
46 
47 #define TI_DBG1(a)    TIDEBUG_MSG(gTiDebugLevel,1, a )
48 #define TI_DBG2(a)    TIDEBUG_MSG(gTiDebugLevel,2, a )
49 #define TI_DBG3(a)    TIDEBUG_MSG(gTiDebugLevel,3, a )
50 #define TI_DBG4(a)    TIDEBUG_MSG(gTiDebugLevel,4, a )
51 #define TI_DBG5(a)    TIDEBUG_MSG(gTiDebugLevel,5, a ) /* OsDebugLevel 4 */
52 #define TI_DBG6(a)    TIDEBUG_MSG(gTiDebugLevel,6, a )
53 #define TI_DBG7(a)
54 
55 extern bit32 gTiDebugMask;
56 #define TI_BIT1(a)    TIDEBUG_MSG(gTiDebugMask,0x00000001, a )
57 #define TI_BIT2(a)    TIDEBUG_MSG(gTiDebugMask,0x00000002, a )
58 #define TI_BIT3(a)    TIDEBUG_MSG(gTiDebugMask,0x00000004, a )
59 #define TI_BIT4(a)    TIDEBUG_MSG(gTiDebugMask,0x00000008, a )
60 #define TI_BIT5(a)    TIDEBUG_MSG(gTiDebugMask,0x00000010, a )
61 #define TI_BIT6(a)    TIDEBUG_MSG(gTiDebugMask,0x00000020, a )
62 
63 
64 
65 #endif  /* TIGLOBAL_H */
66