1/* 2 * (C) Copyright 2011, Julius Baxter <julius@opencores.org> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 17 * MA 02111-1307 USA 18 */ 19 20#ifndef _ASM_TYPES_H 21#define _ASM_TYPES_H 22 23/* 24 * This file is never included by application software unless 25 * explicitly requested (e.g., via linux/types.h) in which case the 26 * application is Linux specific so (user-) name space pollution is 27 * not a major issue. However, for interoperability, libraries still 28 * need to be careful to avoid a name clashes. 29 */ 30 31typedef unsigned short umode_t; 32 33/* 34 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 35 * header files exported to user space 36 */ 37 38typedef __signed__ char __s8; 39typedef unsigned char __u8; 40 41typedef __signed__ short __s16; 42typedef unsigned short __u16; 43 44typedef __signed__ int __s32; 45typedef unsigned int __u32; 46 47#if defined(__GNUC__) 48__extension__ typedef __signed__ long long __s64; 49__extension__ typedef unsigned long long __u64; 50#endif 51 52/* 53 * These aren't exported outside the kernel to avoid name space clashes 54 */ 55#ifdef __KERNEL__ 56 57typedef signed char s8; 58typedef unsigned char u8; 59 60typedef signed short s16; 61typedef unsigned short u16; 62 63typedef signed int s32; 64typedef unsigned int u32; 65 66typedef signed long long s64; 67typedef unsigned long long u64; 68 69#define BITS_PER_LONG 32 70 71/* Dma addresses are 32-bits wide. */ 72 73typedef u32 dma_addr_t; 74 75typedef unsigned long phys_addr_t; 76typedef unsigned long phys_size_t; 77#endif /* __KERNEL__ */ 78 79#endif /* _ASM_TYPES_H */ 80