types.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _BFIN_TYPES_H
  2. #define _BFIN_TYPES_H
  3. /*
  4. * This file is never included by application software unless
  5. * explicitly requested (e.g., via linux/types.h) in which case the
  6. * application is Linux specific so (user-) name space pollution is
  7. * not a major issue. However, for interoperability, libraries still
  8. * need to be careful to avoid a name clashes.
  9. */
  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. /* HK0617 -- Changes to unsigned long temporarily */
  23. #if defined(__GNUC__)
  24. __extension__ typedef __signed__ long long __s64;
  25. __extension__ typedef unsigned long long __u64;
  26. #endif
  27. #endif /* __ASSEMBLY__ */
  28. /*
  29. * These aren't exported outside the kernel to avoid name space clashes
  30. */
  31. #ifdef __KERNEL__
  32. #define BITS_PER_LONG 32
  33. #ifndef __ASSEMBLY__
  34. typedef signed char s8;
  35. typedef unsigned char u8;
  36. typedef signed short s16;
  37. typedef unsigned short u16;
  38. typedef signed int s32;
  39. typedef unsigned int u32;
  40. typedef signed long long s64;
  41. typedef unsigned long long u64;
  42. /* Dma addresses are 32-bits wide. */
  43. typedef u32 dma_addr_t;
  44. typedef u64 dma64_addr_t;
  45. #endif /* __ASSEMBLY__ */
  46. #endif /* __KERNEL__ */
  47. #endif /* _BFIN_TYPES_H */