diff options
author | Becky Bruce <bgill@freescale.com> | 2005-10-19 19:45:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-20 02:22:50 -0400 |
commit | 971dc77b64db9466f5caab56019e62a93c0ddfc5 (patch) | |
tree | 73d153e439d7b205de5eee1c90783af8fcb5f233 /include/asm-powerpc | |
parent | f7f6f4fea68d9981d65f99a589ad85f510924d99 (diff) |
[PATCH] powerpc: Merge types.h
This patch merges types.h into include/asm-powerpc. The only real change is
the removal of the include of linux/config.h from the 32-bit version - it
doesn't appear to be necessary.
This patch has been built on several different 32 and 64-bit platforms,
and booted on mpc8540_ads.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/types.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h new file mode 100644 index 000000000000..7d803cb547bb --- /dev/null +++ b/include/asm-powerpc/types.h | |||
@@ -0,0 +1,104 @@ | |||
1 | #ifndef _ASM_POWERPC_TYPES_H | ||
2 | #define _ASM_POWERPC_TYPES_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | /* | ||
7 | * This file is never included by application software unless | ||
8 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
9 | * application is Linux specific so (user-) name space pollution is | ||
10 | * not a major issue. However, for interoperability, libraries still | ||
11 | * need to be careful to avoid a name clashes. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version | ||
16 | * 2 of the License, or (at your option) any later version. | ||
17 | */ | ||
18 | |||
19 | #ifdef __powerpc64__ | ||
20 | typedef unsigned int umode_t; | ||
21 | #else | ||
22 | typedef unsigned short umode_t; | ||
23 | #endif | ||
24 | |||
25 | /* | ||
26 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
27 | * header files exported to user space | ||
28 | */ | ||
29 | |||
30 | typedef __signed__ char __s8; | ||
31 | typedef unsigned char __u8; | ||
32 | |||
33 | typedef __signed__ short __s16; | ||
34 | typedef unsigned short __u16; | ||
35 | |||
36 | typedef __signed__ int __s32; | ||
37 | typedef unsigned int __u32; | ||
38 | |||
39 | #ifdef __powerpc64__ | ||
40 | typedef __signed__ long __s64; | ||
41 | typedef unsigned long __u64; | ||
42 | #else | ||
43 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) | ||
44 | typedef __signed__ long long __s64; | ||
45 | typedef unsigned long long __u64; | ||
46 | #endif | ||
47 | #endif /* __powerpc64__ */ | ||
48 | |||
49 | typedef struct { | ||
50 | __u32 u[4]; | ||
51 | } __attribute((aligned(16))) __vector128; | ||
52 | |||
53 | #endif /* __ASSEMBLY__ */ | ||
54 | |||
55 | #ifdef __KERNEL__ | ||
56 | /* | ||
57 | * These aren't exported outside the kernel to avoid name space clashes | ||
58 | */ | ||
59 | #ifdef __powerpc64__ | ||
60 | #define BITS_PER_LONG 64 | ||
61 | #else | ||
62 | #define BITS_PER_LONG 32 | ||
63 | #endif | ||
64 | |||
65 | #ifndef __ASSEMBLY__ | ||
66 | |||
67 | typedef signed char s8; | ||
68 | typedef unsigned char u8; | ||
69 | |||
70 | typedef signed short s16; | ||
71 | typedef unsigned short u16; | ||
72 | |||
73 | typedef signed int s32; | ||
74 | typedef unsigned int u32; | ||
75 | |||
76 | #ifdef __powerpc64__ | ||
77 | typedef signed long s64; | ||
78 | typedef unsigned long u64; | ||
79 | #else | ||
80 | typedef signed long long s64; | ||
81 | typedef unsigned long long u64; | ||
82 | #endif | ||
83 | |||
84 | typedef __vector128 vector128; | ||
85 | |||
86 | typedef u32 dma_addr_t; | ||
87 | typedef u64 dma64_addr_t; | ||
88 | |||
89 | typedef struct { | ||
90 | unsigned long entry; | ||
91 | unsigned long toc; | ||
92 | unsigned long env; | ||
93 | } func_descr_t; | ||
94 | |||
95 | #ifdef CONFIG_LBD | ||
96 | typedef u64 sector_t; | ||
97 | #define HAVE_SECTOR_T | ||
98 | #endif | ||
99 | |||
100 | #endif /* __ASSEMBLY__ */ | ||
101 | |||
102 | #endif /* __KERNEL__ */ | ||
103 | |||
104 | #endif /* _ASM_POWERPC_TYPES_H */ | ||