types.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2006 Atmel Corporation
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __ASM_AVR32_TYPES_H
  7. #define __ASM_AVR32_TYPES_H
  8. #ifndef __ASSEMBLY__
  9. typedef unsigned short umode_t;
  10. /*
  11. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  12. * header files exported to user space
  13. */
  14. typedef __signed__ char __s8;
  15. typedef unsigned char __u8;
  16. typedef __signed__ short __s16;
  17. typedef unsigned short __u16;
  18. typedef __signed__ int __s32;
  19. typedef unsigned int __u32;
  20. #if defined(__GNUC__)
  21. __extension__ typedef __signed__ long long __s64;
  22. __extension__ typedef unsigned long long __u64;
  23. #endif
  24. #endif /* __ASSEMBLY__ */
  25. /*
  26. * These aren't exported outside the kernel to avoid name space clashes
  27. */
  28. #ifdef __KERNEL__
  29. #define BITS_PER_LONG 32
  30. #ifndef __ASSEMBLY__
  31. typedef __signed__ char s8;
  32. typedef unsigned char u8;
  33. typedef __signed__ short s16;
  34. typedef unsigned short u16;
  35. typedef __signed__ int s32;
  36. typedef unsigned int u32;
  37. typedef __signed__ long long s64;
  38. typedef unsigned long long u64;
  39. /* Dma addresses are 32-bits wide. */
  40. typedef u32 dma_addr_t;
  41. typedef unsigned long phys_addr_t;
  42. typedef unsigned long phys_size_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 */