Merge branch 'master' of git://git.denx.de/u-boot-spi
[platform/kernel/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 #include <asm-generic/int-ll64.h>
16
17 typedef unsigned short umode_t;
18
19 /*
20  * These aren't exported outside the kernel to avoid name space clashes
21  */
22 #ifdef __KERNEL__
23
24 #ifdef CONFIG_ARCH_RV64I
25 #define BITS_PER_LONG 64
26 #else
27 #define BITS_PER_LONG 32
28 #endif
29
30 #include <stddef.h>
31
32 typedef u32 dma_addr_t;
33
34 typedef unsigned long phys_addr_t;
35 typedef unsigned long phys_size_t;
36
37 #endif /* __KERNEL__ */
38
39 #endif