]> git.sur5r.net Git - u-boot/blob - include/asm-mips/types.h
[MIPS] asm headers' updates
[u-boot] / include / asm-mips / types.h
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
7  * Copyright (C) 1999 Silicon Graphics, Inc.
8  */
9 #ifndef _ASM_TYPES_H
10 #define _ASM_TYPES_H
11
12 #ifndef __ASSEMBLY__
13
14 typedef unsigned short umode_t;
15
16 /*
17  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
18  * header files exported to user space
19  */
20
21 typedef __signed__ char __s8;
22 typedef unsigned char __u8;
23
24 typedef __signed__ short __s16;
25 typedef unsigned short __u16;
26
27 typedef __signed__ int __s32;
28 typedef unsigned int __u32;
29
30 #if (_MIPS_SZLONG == 64)
31
32 typedef __signed__ long __s64;
33 typedef unsigned long __u64;
34
35 #else
36
37 #if defined(__GNUC__)
38 __extension__ typedef __signed__ long long __s64;
39 __extension__ typedef unsigned long long __u64;
40 #endif
41
42 #endif
43
44 #endif /* __ASSEMBLY__ */
45
46 /*
47  * These aren't exported outside the kernel to avoid name space clashes
48  */
49 #ifdef __KERNEL__
50
51 #define BITS_PER_LONG _MIPS_SZLONG
52
53 #ifndef __ASSEMBLY__
54
55 typedef __signed char s8;
56 typedef unsigned char u8;
57
58 typedef __signed short s16;
59 typedef unsigned short u16;
60
61 typedef __signed int s32;
62 typedef unsigned int u32;
63
64 #if (_MIPS_SZLONG == 64)
65
66 typedef __signed__ long s64;
67 typedef unsigned long u64;
68
69 #else
70
71 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
72 typedef __signed__ long long s64;
73 typedef unsigned long long u64;
74 #endif
75
76 #endif
77
78 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
79     || defined(CONFIG_64BIT)
80 typedef u64 dma_addr_t;
81 #else
82 typedef u32 dma_addr_t;
83 #endif
84 typedef u64 dma64_addr_t;
85
86 /*
87  * Don't use phys_t.  You've been warned.
88  */
89 #ifdef CONFIG_64BIT_PHYS_ADDR
90 typedef unsigned long long phys_t;
91 #else
92 typedef unsigned long phys_t;
93 #endif
94
95 #endif /* __ASSEMBLY__ */
96
97 #endif /* __KERNEL__ */
98
99 #endif /* _ASM_TYPES_H */