1285809Sscottl/*******************************************************************************
2285809Sscottl *Copyright (c) 2014 PMC-Sierra, Inc.  All rights reserved.
3285809Sscottl*
4285809Sscottl*Redistribution and use in source and binary forms, with or without modification, are permitted provided
5285809Sscottl*that the following conditions are met:
6285809Sscottl*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7285809Sscottl*following disclaimer.
8285809Sscottl*2. Redistributions in binary form must reproduce the above copyright notice,
9285809Sscottl*this list of conditions and the following disclaimer in the documentation and/or other materials provided
10285809Sscottl*with the distribution.
11285809Sscottl*
12285809Sscottl*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13285809Sscottl*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14285809Sscottl*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15285809Sscottl*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16285809Sscottl*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17285809Sscottl*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18285809Sscottl*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19285809Sscottl*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20285809Sscottl*
21285809Sscottl* $FreeBSD$
22285809Sscottl*
23285809Sscottl ********************************************************************************/
24285809Sscottl/********************************************************************************
25285809Sscottl **
26285809Sscottl **   tiglobal.h
27285809Sscottl **
28285809Sscottl **   Abstract:
29285809Sscottl **
30285809Sscottl ********************************************************************************/
31285809Sscottl
32285809Sscottl
33285809Sscottl#ifndef TIGLOBAL_H
34285809Sscottl#define TIGLOBAL_H
35285809Sscottl
36285809Sscottl#include <dev/pms/freebsd/driver/common/osenv.h>
37285809Sscottl#include <dev/pms/freebsd/driver/common/ostypes.h>
38285809Sscottl#include <dev/pms/freebsd/driver/common/osdebug.h>
39285809Sscottl
40285809Sscottl#ifndef TIDEBUG_MSG
41285809Sscottl#define TIDEBUG_MSG(mask, val, format)
42285809Sscottl#endif
43285809Sscottl
44285809Sscottlextern bit32 gTiDebugLevel;
45285809Sscottl
46285809Sscottl#define TI_DBG0(a)    TIDEBUG_MSG0(a) /* always print */
47285809Sscottl
48285809Sscottl#define TI_DBG1(a)    TIDEBUG_MSG(gTiDebugLevel,1, a )
49285809Sscottl#define TI_DBG2(a)    TIDEBUG_MSG(gTiDebugLevel,2, a )
50285809Sscottl#define TI_DBG3(a)    TIDEBUG_MSG(gTiDebugLevel,3, a )
51285809Sscottl#define TI_DBG4(a)    TIDEBUG_MSG(gTiDebugLevel,4, a )
52285809Sscottl#define TI_DBG5(a)    TIDEBUG_MSG(gTiDebugLevel,5, a ) /* OsDebugLevel 4 */
53285809Sscottl#define TI_DBG6(a)    TIDEBUG_MSG(gTiDebugLevel,6, a )
54285809Sscottl#define TI_DBG7(a)
55285809Sscottl
56285809Sscottlextern bit32 gTiDebugMask;
57285809Sscottl#define TI_BIT1(a)    TIDEBUG_MSG(gTiDebugMask,0x00000001, a )
58285809Sscottl#define TI_BIT2(a)    TIDEBUG_MSG(gTiDebugMask,0x00000002, a )
59285809Sscottl#define TI_BIT3(a)    TIDEBUG_MSG(gTiDebugMask,0x00000004, a )
60285809Sscottl#define TI_BIT4(a)    TIDEBUG_MSG(gTiDebugMask,0x00000008, a )
61285809Sscottl#define TI_BIT5(a)    TIDEBUG_MSG(gTiDebugMask,0x00000010, a )
62285809Sscottl#define TI_BIT6(a)    TIDEBUG_MSG(gTiDebugMask,0x00000020, a )
63285809Sscottl
64285809Sscottl
65285809Sscottl
66285809Sscottl#endif  /* TIGLOBAL_H */
67