1/* 2 * include/asm-xtensa/types.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 */ 10 11#ifndef _XTENSA_TYPES_H 12#define _XTENSA_TYPES_H 13 14 15#ifdef __ASSEMBLY__ 16# define __XTENSA_UL(x) (x) 17# define __XTENSA_UL_CONST(x) x 18#else 19# define __XTENSA_UL(x) ((unsigned long)(x)) 20# define __XTENSA_UL_CONST(x) x##UL 21#endif 22 23#ifndef __ASSEMBLY__ 24 25typedef unsigned short umode_t; 26 27/* 28 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 29 * header files exported to user space 30 */ 31 32typedef __signed__ char __s8; 33typedef unsigned char __u8; 34 35typedef __signed__ short __s16; 36typedef unsigned short __u16; 37 38typedef __signed__ int __s32; 39typedef unsigned int __u32; 40 41#if defined(__GNUC__) 42__extension__ typedef __signed__ long long __s64; 43__extension__ typedef unsigned long long __u64; 44#endif 45 46/* 47 * These aren't exported outside the kernel to avoid name space clashes 48 */ 49#ifdef __KERNEL__ 50 51typedef __signed__ char s8; 52typedef unsigned char u8; 53 54typedef __signed__ short s16; 55typedef unsigned short u16; 56 57typedef __signed__ int s32; 58typedef unsigned int u32; 59 60typedef __signed__ long long s64; 61typedef unsigned long long u64; 62 63 64#define BITS_PER_LONG 32 65 66/* Dma addresses are 32-bits wide. */ 67 68typedef u32 dma_addr_t; 69 70#endif /* __KERNEL__ */ 71#endif 72 73#endif /* _XTENSA_TYPES_H */