add rk3288 pinctrl dts code
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rkwifi / bcmdhd / include / typedefs.h
1 /*
2  * $Copyright Open Broadcom Corporation$
3  * $Id: typedefs.h 397286 2013-04-18 01:42:19Z $
4  */
5
6 #ifndef _TYPEDEFS_H_
7 #define _TYPEDEFS_H_
8
9 #ifdef SITE_TYPEDEFS
10
11
12
13 #include "site_typedefs.h"
14
15 #else
16
17
18
19 #ifdef __cplusplus
20
21 #define TYPEDEF_BOOL
22 #ifndef FALSE
23 #define FALSE   false
24 #endif
25 #ifndef TRUE
26 #define TRUE    true
27 #endif
28
29 #else   
30
31
32 #endif  
33
34 #if defined(__x86_64__)
35 #define TYPEDEF_UINTPTR
36 typedef unsigned long long int uintptr;
37 #endif
38
39
40
41
42
43 #if defined(_NEED_SIZE_T_)
44 typedef long unsigned int size_t;
45 #endif
46
47
48
49
50
51 #if defined(__sparc__)
52 #define TYPEDEF_ULONG
53 #endif
54
55
56
57 #if !defined(LINUX_HYBRID) || defined(LINUX_PORT)
58 #define TYPEDEF_UINT
59 #ifndef TARGETENV_android
60 #define TYPEDEF_USHORT
61 #define TYPEDEF_ULONG
62 #endif 
63 #ifdef __KERNEL__
64 #include <linux/version.h>
65 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
66 #define TYPEDEF_BOOL
67 #endif  
68
69 #if (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18))
70 #include <linux/compiler.h>
71 #ifdef noinline_for_stack
72 #define TYPEDEF_BOOL
73 #endif
74 #endif  
75 #endif  
76 #endif  
77
78
79
80
81
82 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
83 #define TYPEDEF_INT64
84 #define TYPEDEF_UINT64
85 #endif 
86
87
88 #if defined(__ICL)
89
90 #define TYPEDEF_INT64
91
92 #if defined(__STDC__)
93 #define TYPEDEF_UINT64
94 #endif
95
96 #endif 
97
98 #if !defined(__DJGPP__)
99
100
101 #if defined(__KERNEL__)
102
103
104 #if !defined(LINUX_HYBRID) || defined(LINUX_PORT)
105 #include <linux/types.h>        
106 #endif 
107
108 #else
109
110
111 #include <sys/types.h>
112
113 #endif 
114
115 #endif 
116
117
118
119
120 #define USE_TYPEDEF_DEFAULTS
121
122 #endif 
123
124
125
126
127 #ifdef USE_TYPEDEF_DEFAULTS
128 #undef USE_TYPEDEF_DEFAULTS
129
130 #ifndef TYPEDEF_BOOL
131 typedef  unsigned char  bool;
132 #endif
133
134
135
136 #ifndef TYPEDEF_UCHAR
137 typedef unsigned char   uchar;
138 #endif
139
140 #ifndef TYPEDEF_USHORT
141 typedef unsigned short  ushort;
142 #endif
143
144 #ifndef TYPEDEF_UINT
145 typedef unsigned int    uint;
146 #endif
147
148 #ifndef TYPEDEF_ULONG
149 typedef unsigned long   ulong;
150 #endif
151
152
153
154 #ifndef TYPEDEF_UINT8
155 typedef unsigned char   uint8;
156 #endif
157
158 #ifndef TYPEDEF_UINT16
159 typedef unsigned short  uint16;
160 #endif
161
162 #ifndef TYPEDEF_UINT32
163 typedef unsigned int    uint32;
164 #endif
165
166 #ifndef TYPEDEF_UINT64
167 typedef unsigned long long uint64;
168 #endif
169
170 #ifndef TYPEDEF_UINTPTR
171 typedef unsigned int    uintptr;
172 #endif
173
174 #ifndef TYPEDEF_INT8
175 typedef signed char     int8;
176 #endif
177
178 #ifndef TYPEDEF_INT16
179 typedef signed short    int16;
180 #endif
181
182 #ifndef TYPEDEF_INT32
183 typedef signed int      int32;
184 #endif
185
186 #ifndef TYPEDEF_INT64
187 typedef signed long long int64;
188 #endif
189
190
191
192 #ifndef TYPEDEF_FLOAT32
193 typedef float           float32;
194 #endif
195
196 #ifndef TYPEDEF_FLOAT64
197 typedef double          float64;
198 #endif
199
200
201
202 #ifndef TYPEDEF_FLOAT_T
203
204 #if defined(FLOAT32)
205 typedef float32 float_t;
206 #else 
207 typedef float64 float_t;
208 #endif
209
210 #endif 
211
212
213
214 #ifndef FALSE
215 #define FALSE   0
216 #endif
217
218 #ifndef TRUE
219 #define TRUE    1  
220 #endif
221
222 #ifndef NULL
223 #define NULL    0
224 #endif
225
226 #ifndef OFF
227 #define OFF     0
228 #endif
229
230 #ifndef ON
231 #define ON      1  
232 #endif
233
234 #define AUTO    (-1) 
235
236
237
238 #ifndef PTRSZ
239 #define PTRSZ   sizeof(char*)
240 #endif
241
242
243
244 #if defined(__GNUC__) || defined(__lint)
245         #define BWL_COMPILER_GNU
246 #elif defined(__CC_ARM) && __CC_ARM
247         #define BWL_COMPILER_ARMCC
248 #else
249         #error "Unknown compiler!"
250 #endif 
251
252
253 #ifndef INLINE
254         #if defined(BWL_COMPILER_MICROSOFT)
255                 #define INLINE __inline
256         #elif defined(BWL_COMPILER_GNU)
257                 #define INLINE __inline__
258         #elif defined(BWL_COMPILER_ARMCC)
259                 #define INLINE  __inline
260         #else
261                 #define INLINE
262         #endif 
263 #endif 
264
265 #undef TYPEDEF_BOOL
266 #undef TYPEDEF_UCHAR
267 #undef TYPEDEF_USHORT
268 #undef TYPEDEF_UINT
269 #undef TYPEDEF_ULONG
270 #undef TYPEDEF_UINT8
271 #undef TYPEDEF_UINT16
272 #undef TYPEDEF_UINT32
273 #undef TYPEDEF_UINT64
274 #undef TYPEDEF_UINTPTR
275 #undef TYPEDEF_INT8
276 #undef TYPEDEF_INT16
277 #undef TYPEDEF_INT32
278 #undef TYPEDEF_INT64
279 #undef TYPEDEF_FLOAT32
280 #undef TYPEDEF_FLOAT64
281 #undef TYPEDEF_FLOAT_T
282
283 #endif 
284
285
286 #define UNUSED_PARAMETER(x) (void)(x)
287
288
289 #define DISCARD_QUAL(ptr, type) ((type *)(uintptr)(ptr))
290
291
292 #include <bcmdefs.h>
293 #endif