Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | #ifndef _BFIN_TYPES_H |
| 2 | #define _BFIN_TYPES_H |
| 3 | |
| 4 | /* |
| 5 | * This file is never included by application software unless |
| 6 | * explicitly requested (e.g., via linux/types.h) in which case the |
| 7 | * application is Linux specific so (user-) name space pollution is |
| 8 | * not a major issue. However, for interoperability, libraries still |
| 9 | * need to be careful to avoid a name clashes. |
| 10 | */ |
| 11 | #ifndef __ASSEMBLY__ |
| 12 | |
| 13 | typedef unsigned short umode_t; |
| 14 | |
| 15 | /* |
| 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the |
| 17 | * header files exported to user space |
| 18 | */ |
| 19 | |
| 20 | typedef __signed__ char __s8; |
| 21 | typedef unsigned char __u8; |
| 22 | |
| 23 | typedef __signed__ short __s16; |
| 24 | typedef unsigned short __u16; |
| 25 | |
| 26 | typedef __signed__ int __s32; |
| 27 | typedef unsigned int __u32; |
| 28 | |
| 29 | /* HK0617 -- Changes to unsigned long temporarily */ |
Olaf Hering | 68a9bd0 | 2007-10-16 23:27:13 -0700 | [diff] [blame^] | 30 | #if defined(__GNUC__) |
| 31 | __extension__ typedef __signed__ long long __s64; |
| 32 | __extension__ typedef unsigned long long __u64; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 33 | #endif |
| 34 | |
| 35 | #endif /* __ASSEMBLY__ */ |
| 36 | /* |
| 37 | * These aren't exported outside the kernel to avoid name space clashes |
| 38 | */ |
| 39 | #ifdef __KERNEL__ |
| 40 | |
| 41 | #define BITS_PER_LONG 32 |
| 42 | |
| 43 | #ifndef __ASSEMBLY__ |
| 44 | |
| 45 | typedef signed char s8; |
| 46 | typedef unsigned char u8; |
| 47 | |
| 48 | typedef signed short s16; |
| 49 | typedef unsigned short u16; |
| 50 | |
| 51 | typedef signed int s32; |
| 52 | typedef unsigned int u32; |
| 53 | |
| 54 | typedef signed long long s64; |
| 55 | typedef unsigned long long u64; |
| 56 | |
| 57 | /* Dma addresses are 32-bits wide. */ |
| 58 | |
| 59 | typedef u32 dma_addr_t; |
| 60 | typedef u64 dma64_addr_t; |
| 61 | |
| 62 | #endif /* __ASSEMBLY__ */ |
| 63 | |
| 64 | #endif /* __KERNEL__ */ |
| 65 | |
| 66 | #endif /* _BFIN_TYPES_H */ |