xref: /nrf52832-nimble/rt-thread/libcpu/ppc/ppc405/include/asm/types.h (revision 104654410c56c573564690304ae786df310c91fc)
1 #ifndef _PPC_TYPES_H
2 #define _PPC_TYPES_H
3 
4 
5 #ifndef __ASSEMBLY__
6 
7 typedef enum bool
8     {
9     FALSE = 0,
10     TRUE = 1
11     }BOOL;
12 
13 typedef unsigned short umode_t;
14 
15 typedef __signed__ char __s8;
16 typedef unsigned char __u8;
17 
18 typedef __signed__ short __s16;
19 typedef unsigned short __u16;
20 
21 typedef __signed__ int __s32;
22 typedef unsigned int __u32;
23 
24 #if defined(__GNUC__)
25 __extension__ typedef __signed__ long long __s64;
26 __extension__ typedef unsigned long long __u64;
27 #endif
28 
29 typedef struct {
30 	__u32 u[4];
31 } __attribute__((aligned(16))) vector128;
32 
33 #ifdef __KERNEL__
34 /*
35  * These aren't exported outside the kernel to avoid name space clashes
36  */
37 typedef signed char s8;
38 typedef unsigned char u8;
39 
40 typedef signed short s16;
41 typedef unsigned short u16;
42 
43 typedef signed int s32;
44 typedef unsigned int u32;
45 
46 typedef signed long long s64;
47 typedef unsigned long long u64;
48 
49 typedef char INT8;
50 typedef short INT16;
51 typedef int INT32;
52 typedef long long INT64;
53 typedef unsigned char UINT8;
54 typedef unsigned short UINT16;
55 typedef unsigned int UINT32;
56 typedef unsigned long long UINT64;
57 
58 #define BITS_PER_LONG 32
59 
60 /* DMA addresses are 32-bits wide */
61 typedef u32 dma_addr_t;
62 
63 #ifdef CONFIG_PHYS_64BIT
64 typedef unsigned long long phys_addr_t;
65 typedef unsigned long long phys_size_t;
66 #else
67 typedef unsigned long phys_addr_t;
68 typedef unsigned long phys_size_t;
69 #endif
70 
71 #endif /* __KERNEL__ */
72 #endif /* __ASSEMBLY__ */
73 
74 #endif
75