types.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (C) 2004-2006 Atmel Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __ASM_AVR32_TYPES_H
  9. #define __ASM_AVR32_TYPES_H
  10. #ifndef __ASSEMBLY__
  11. typedef unsigned short umode_t;
  12. /*
  13. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  14. * header files exported to user space
  15. */
  16. typedef __signed__ char __s8;
  17. typedef unsigned char __u8;
  18. typedef __signed__ short __s16;
  19. typedef unsigned short __u16;
  20. typedef __signed__ int __s32;
  21. typedef unsigned int __u32;
  22. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  23. typedef __signed__ long long __s64;
  24. typedef unsigned long long __u64;
  25. #endif
  26. #endif /* __ASSEMBLY__ */
  27. /*
  28. * These aren't exported outside the kernel to avoid name space clashes
  29. */
  30. #ifdef __KERNEL__
  31. #define BITS_PER_LONG 32
  32. #ifndef __ASSEMBLY__
  33. typedef signed char s8;
  34. typedef unsigned char u8;
  35. typedef signed short s16;
  36. typedef unsigned short u16;
  37. typedef signed int s32;
  38. typedef unsigned int u32;
  39. typedef signed long long s64;
  40. typedef unsigned long long u64;
  41. /* Dma addresses are 32-bits wide. */
  42. typedef u32 dma_addr_t;
  43. #ifdef CONFIG_LBD
  44. typedef u64 sector_t;
  45. #define HAVE_SECTOR_T
  46. #endif
  47. #endif /* __ASSEMBLY__ */
  48. #endif /* __KERNEL__ */
  49. #endif /* __ASM_AVR32_TYPES_H */