xref: /freebsd/sys/dev/pms/RefTisa/tisa/api/tiglobal.h (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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 * $FreeBSD$
22 *
23  ********************************************************************************/
24 /********************************************************************************
25  **
26  **   tiglobal.h
27  **
28  **   Abstract:
29  **
30  ********************************************************************************/
31 
32 
33 #ifndef TIGLOBAL_H
34 #define TIGLOBAL_H
35 
36 #include <dev/pms/freebsd/driver/common/osenv.h>
37 #include <dev/pms/freebsd/driver/common/ostypes.h>
38 #include <dev/pms/freebsd/driver/common/osdebug.h>
39 
40 #ifndef TIDEBUG_MSG
41 #define TIDEBUG_MSG(mask, val, format)
42 #endif
43 
44 extern bit32 gTiDebugLevel;
45 
46 #define TI_DBG0(a)    TIDEBUG_MSG0(a) /* always print */
47 
48 #define TI_DBG1(a)    TIDEBUG_MSG(gTiDebugLevel,1, a )
49 #define TI_DBG2(a)    TIDEBUG_MSG(gTiDebugLevel,2, a )
50 #define TI_DBG3(a)    TIDEBUG_MSG(gTiDebugLevel,3, a )
51 #define TI_DBG4(a)    TIDEBUG_MSG(gTiDebugLevel,4, a )
52 #define TI_DBG5(a)    TIDEBUG_MSG(gTiDebugLevel,5, a ) /* OsDebugLevel 4 */
53 #define TI_DBG6(a)    TIDEBUG_MSG(gTiDebugLevel,6, a )
54 #define TI_DBG7(a)
55 
56 extern bit32 gTiDebugMask;
57 #define TI_BIT1(a)    TIDEBUG_MSG(gTiDebugMask,0x00000001, a )
58 #define TI_BIT2(a)    TIDEBUG_MSG(gTiDebugMask,0x00000002, a )
59 #define TI_BIT3(a)    TIDEBUG_MSG(gTiDebugMask,0x00000004, a )
60 #define TI_BIT4(a)    TIDEBUG_MSG(gTiDebugMask,0x00000008, a )
61 #define TI_BIT5(a)    TIDEBUG_MSG(gTiDebugMask,0x00000010, a )
62 #define TI_BIT6(a)    TIDEBUG_MSG(gTiDebugMask,0x00000020, a )
63 
64 
65 
66 #endif  /* TIGLOBAL_H */
67