]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/mips/include/asm/types.h
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / arch / mips / include / asm / types.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0 */
282223a6 2/*
6069ff26
WD
3 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
4 * Copyright (C) 1999 Silicon Graphics, Inc.
5 */
6#ifndef _ASM_TYPES_H
7#define _ASM_TYPES_H
8
282223a6
SK
9#ifndef __ASSEMBLY__
10
6069ff26
WD
11typedef unsigned short umode_t;
12
13/*
14 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
15 * header files exported to user space
16 */
17
18typedef __signed__ char __s8;
19typedef unsigned char __u8;
20
21typedef __signed__ short __s16;
22typedef unsigned short __u16;
23
24typedef __signed__ int __s32;
25typedef unsigned int __u32;
26
b075d74e
SK
27#if defined(__GNUC__)
28__extension__ typedef __signed__ long long __s64;
29__extension__ typedef unsigned long long __u64;
37f93f7b
DS
30#else
31typedef __signed__ long long __s64;
32typedef unsigned long long __u64;
6069ff26
WD
33#endif
34
282223a6
SK
35#endif /* __ASSEMBLY__ */
36
6069ff26
WD
37/*
38 * These aren't exported outside the kernel to avoid name space clashes
39 */
40#ifdef __KERNEL__
41
282223a6
SK
42#define BITS_PER_LONG _MIPS_SZLONG
43
44#ifndef __ASSEMBLY__
45
6069ff26
WD
46typedef __signed char s8;
47typedef unsigned char u8;
48
49typedef __signed short s16;
50typedef unsigned short u16;
51
52typedef __signed int s32;
53typedef unsigned int u32;
54
6069ff26
WD
55typedef __signed__ long long s64;
56typedef unsigned long long u64;
6069ff26 57
282223a6
SK
58#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
59 || defined(CONFIG_64BIT)
60typedef u64 dma_addr_t;
e99ccb48
KG
61
62typedef u64 phys_addr_t;
63typedef u64 phys_size_t;
64
282223a6
SK
65#else
66typedef u32 dma_addr_t;
e99ccb48
KG
67
68typedef u32 phys_addr_t;
69typedef u32 phys_size_t;
70
282223a6
SK
71#endif
72typedef u64 dma64_addr_t;
73
74/*
75 * Don't use phys_t. You've been warned.
76 */
77#ifdef CONFIG_64BIT_PHYS_ADDR
78typedef unsigned long long phys_t;
79#else
80typedef unsigned long phys_t;
81#endif
6069ff26 82
282223a6 83#endif /* __ASSEMBLY__ */
6069ff26
WD
84
85#endif /* __KERNEL__ */
86
87#endif /* _ASM_TYPES_H */