1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2016-09-07 Urey the first version 9 */ 10 11 #ifndef _MIPS_TYPES_H_ 12 #define _MIPS_TYPES_H_ 13 14 #ifndef __ASSEMBLY__ 15 16 typedef unsigned short umode_t; 17 18 /* 19 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 20 * header files exported to user space 21 */ 22 23 typedef __signed__ char __s8; 24 typedef unsigned char __u8; 25 26 typedef __signed__ short __s16; 27 typedef unsigned short __u16; 28 29 typedef __signed__ int __s32; 30 typedef unsigned int __u32; 31 32 #if (_MIPS_SZLONG == 64) 33 34 typedef __signed__ long __s64; 35 typedef unsigned long __u64; 36 37 #else 38 39 #if defined(__GNUC__) 40 __extension__ typedef __signed__ long long __s64; 41 __extension__ typedef unsigned long long __u64; 42 #endif 43 44 #endif 45 46 /* 47 * These aren't exported outside the kernel to avoid name space clashes 48 */ 49 50 #define BITS_PER_LONG _MIPS_SZLONG 51 52 53 typedef __signed char s8; 54 typedef unsigned char u8; 55 56 typedef __signed short s16; 57 typedef unsigned short u16; 58 59 typedef __signed int s32; 60 typedef unsigned int u32; 61 62 #if (_MIPS_SZLONG == 64) 63 64 typedef __signed__ long s64; 65 typedef unsigned long u64; 66 67 #else 68 69 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 70 typedef __signed__ long long s64; 71 typedef unsigned long long u64; 72 #endif 73 74 #endif 75 76 typedef u32 dma_addr_t; 77 78 typedef u32 phys_addr_t; 79 typedef u32 phys_size_t; 80 81 82 /* 83 * Don't use phys_t. You've been warned. 84 */ 85 86 typedef unsigned long phys_t; 87 88 #endif /* __ASSEMBLY__ */ 89 90 91 #endif /* _MIPS_TYPES_H_ */ 92