types.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2006 Atmel Corporation
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __ASM_AVR32_TYPES_H
  23. #define __ASM_AVR32_TYPES_H
  24. #ifndef __ASSEMBLY__
  25. typedef unsigned short umode_t;
  26. /*
  27. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  28. * header files exported to user space
  29. */
  30. typedef __signed__ char __s8;
  31. typedef unsigned char __u8;
  32. typedef __signed__ short __s16;
  33. typedef unsigned short __u16;
  34. typedef __signed__ int __s32;
  35. typedef unsigned int __u32;
  36. #if defined(__GNUC__)
  37. __extension__ typedef __signed__ long long __s64;
  38. __extension__ typedef unsigned long long __u64;
  39. #endif
  40. #endif /* __ASSEMBLY__ */
  41. /*
  42. * These aren't exported outside the kernel to avoid name space clashes
  43. */
  44. #ifdef __KERNEL__
  45. #define BITS_PER_LONG 32
  46. #ifndef __ASSEMBLY__
  47. typedef __signed__ char s8;
  48. typedef unsigned char u8;
  49. typedef __signed__ short s16;
  50. typedef unsigned short u16;
  51. typedef __signed__ int s32;
  52. typedef unsigned int u32;
  53. typedef __signed__ long long s64;
  54. typedef unsigned long long u64;
  55. /* Dma addresses are 32-bits wide. */
  56. typedef u32 dma_addr_t;
  57. typedef unsigned long phys_addr_t;
  58. typedef unsigned long phys_size_t;
  59. #ifdef CONFIG_LBD
  60. typedef u64 sector_t;
  61. #define HAVE_SECTOR_T
  62. #endif
  63. #endif /* __ASSEMBLY__ */
  64. #endif /* __KERNEL__ */
  65. #endif /* __ASM_AVR32_TYPES_H */