1 #ifndef __ARM_TYPES_H__
2 #define __ARM_TYPES_H__
3 
4 #if defined(CONFIG_ARM_32)
5 
6 typedef u32 vaddr_t;
7 #define PRIvaddr PRIx32
8 #if defined(CONFIG_PHYS_ADDR_T_32)
9 
10 /*
11  * We use "unsigned long" and not "uint32_t" to denote the type. This is done
12  * to avoid having a cast each time PAGE_* macros are used on paddr_t. For eg
13  * PAGE_SIZE is defined as unsigned long.
14  * On 32-bit architecture, "unsigned long" is 32-bit wide. Thus, we can use it
15  * to denote physical address.
16  */
17 typedef unsigned long paddr_t;
18 #define INVALID_PADDR (~0UL)
19 #define PRIpaddr "08lx"
20 #else
21 typedef u64 paddr_t;
22 #define INVALID_PADDR (~0ULL)
23 #define PRIpaddr "016llx"
24 #endif
25 typedef u32 register_t;
26 #define PRIregister "08x"
27 
28 #elif defined(CONFIG_ARM_64)
29 
30 typedef u64 vaddr_t;
31 #define PRIvaddr PRIx64
32 typedef u64 paddr_t;
33 #define INVALID_PADDR (~0UL)
34 #define PRIpaddr "016lx"
35 typedef u64 register_t;
36 #define PRIregister "016lx"
37 
38 #endif
39 
40 #endif /* __ARM_TYPES_H__ */
41 /*
42  * Local variables:
43  * mode: C
44  * c-file-style: "BSD"
45  * c-basic-offset: 4
46  * indent-tabs-mode: nil
47  * End:
48  */
49