]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/riscv/include/asm/types.h
riscv: nx25: include: Add header files to support RISC-V
[people/ms/u-boot.git] / arch / riscv / include / asm / types.h
1 /*
2 * Copyright (C) 2011 Andes Technology Corporation
3 * Copyright (C) 2010 Shawn Lin (nobuhiro@andestech.com)
4 * Copyright (C) 2011 Macpaul Lin (macpaul@andestech.com)
5 * Copyright (C) 2017 Rick Chen (rick@andestech.com)
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12 #ifndef __ASM_RISCV_TYPES_H
13 #define __ASM_RISCV_TYPES_H
14
15 typedef unsigned short umode_t;
16
17 /*
18 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
19 * header files exported to user space
20 */
21
22 typedef __signed__ char __s8;
23 typedef unsigned char __u8;
24
25 typedef __signed__ short __s16;
26 typedef unsigned short __u16;
27
28 typedef __signed__ int __s32;
29 typedef unsigned int __u32;
30
31 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
32 typedef __signed__ long long __s64;
33 typedef unsigned long long __u64;
34 #endif
35
36 /*
37 * These aren't exported outside the kernel to avoid name space clashes
38 */
39 #ifdef __KERNEL__
40
41 typedef signed char s8;
42 typedef unsigned char u8;
43
44 typedef signed short s16;
45 typedef unsigned short u16;
46
47 typedef signed int s32;
48 typedef unsigned int u32;
49
50 typedef signed long long s64;
51 typedef unsigned long long u64;
52
53 #define BITS_PER_LONG 32
54
55 #include <stddef.h>
56
57 typedef u32 dma_addr_t;
58
59 typedef unsigned long phys_addr_t;
60 typedef unsigned long phys_size_t;
61
62 #endif /* __KERNEL__ */
63
64 #endif