usb: ohci-at91: use descriptor-based gpio APIs correctly
[linux/fpc-iii.git] / arch / powerpc / boot / types.h
blobaf6b66b842c474ddbda77312e80bae96d412e11c
1 #ifndef _TYPES_H_
2 #define _TYPES_H_
4 #include <stdbool.h>
6 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8 typedef unsigned char u8;
9 typedef unsigned short u16;
10 typedef unsigned int u32;
11 typedef unsigned long long u64;
12 typedef signed char s8;
13 typedef short s16;
14 typedef int s32;
15 typedef long long s64;
17 /* required for opal-api.h */
18 typedef u8 uint8_t;
19 typedef u16 uint16_t;
20 typedef u32 uint32_t;
21 typedef u64 uint64_t;
22 typedef s8 int8_t;
23 typedef s16 int16_t;
24 typedef s32 int32_t;
25 typedef s64 int64_t;
27 #define min(x,y) ({ \
28 typeof(x) _x = (x); \
29 typeof(y) _y = (y); \
30 (void) (&_x == &_y); \
31 _x < _y ? _x : _y; })
33 #define max(x,y) ({ \
34 typeof(x) _x = (x); \
35 typeof(y) _y = (y); \
36 (void) (&_x == &_y); \
37 _x > _y ? _x : _y; })
39 #define min_t(type, a, b) min(((type) a), ((type) b))
40 #define max_t(type, a, b) max(((type) a), ((type) b))
42 typedef int bool;
44 #ifndef true
45 #define true 1
46 #endif
48 #ifndef false
49 #define false 0
50 #endif
51 #endif /* _TYPES_H_ */