1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
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
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.
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
23 *******************************************************************************/
24 /******************************************************************************
27 *******************************************************************************
31 Request by fclayer for data type define.
33 EW - Yiding(Eddie) Wang
35 Kernel or loadable module
37 Version Control Information:
41 $Revision: 114125 $0.1.0
42 $Date: 2012-04-23 23:37:56 -0700 (Mon, 23 Apr 2012) $09-27-2001
43 $Modtime: 11/12/01 11:15a $15:56:00
46 **************************** MODIFICATION HISTORY *****************************
47 NAME DATE Rev. DESCRIPTION
48 ---- ---- ---- -----------
49 EW 09-16-2002 0.1.0 Header file for most constant definitions
50 ******************************************************************************/
55 #include <sys/types.h>
56 #include <sys/kernel.h>
60 ** Included for Linux 2.4, built in kernel and other possible cases.
64 #if !defined(AGBUILD_TFE_DRIVER) && !defined(COMBO_IBE_TFE_MODULE)
70 ** Included for possible lower layer ignorance.
87 //#define FORCEINLINE inline
90 #if defined (__amd64__)
91 #define BITS_PER_LONG 64
93 #define BITS_PER_LONG 32
97 typedef unsigned char bit8;
98 typedef unsigned short bit16;
99 typedef unsigned int bit32;
101 typedef short sbit16;
103 typedef unsigned int BOOLEAN;
104 typedef unsigned long long bit64;
105 typedef long long sbit64;
107 //typedef unsigned long long bitptr;
109 #if (BITS_PER_LONG == 64)
110 typedef unsigned long long bitptr;
112 typedef unsigned long bitptr;
120 typedef long long S64;
122 typedef unsigned char U08;
123 typedef unsigned short U16;
124 typedef unsigned int U32;
125 typedef unsigned long U32_64;
126 typedef unsigned long long U64;
129 ** some really basic defines
131 #define GLOBAL extern
142 #define NULL ((void*)0)
146 #define agBOOLEAN BOOLEAN
147 #define osGLOBAL GLOBAL
148 #define osLOCAL LOCAL
150 #define agFALSE FALSE
153 #define AGTIAPI_UNKNOWN 2
154 #define AGTIAPI_SUCCESS 1
155 #define AGTIAPI_FAIL 0
157 #define AGTIAPI_DRIVER_VERSION "1.4.0.10800"
159 /***************************************************************************
160 ****************************************************************************
161 * MACROS - some basic macros
162 ****************************************************************************
163 ***************************************************************************/
165 #define BIT(x) (1<<x)
168 #define osti_sprintf sprintf
170 #endif /* __OSTYPES_H__ */