types.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * U-Boot - types.h
  3. *
  4. * Copyright (c) 2005-2007 Analog Devices Inc.
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _BLACKFIN_TYPES_H
  9. #define _BLACKFIN_TYPES_H
  10. /*
  11. * This file is never included by application software unless
  12. * explicitly requested (e.g., via linux/types.h) in which case the
  13. * application is Linux specific so (user-) name space pollution is
  14. * not a major issue. However, for interoperability, libraries still
  15. * need to be careful to avoid a name clashes.
  16. */
  17. typedef unsigned short umode_t;
  18. /*
  19. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  20. * header files exported to user space
  21. */
  22. typedef __signed__ char __s8;
  23. typedef unsigned char __u8;
  24. typedef __signed__ short __s16;
  25. typedef unsigned short __u16;
  26. typedef __signed__ int __s32;
  27. typedef unsigned int __u32;
  28. /* HK0617 -- Changes to unsigned long temporarily */
  29. #if defined(__GNUC__)
  30. __extension__ typedef __signed__ long long __s64;
  31. __extension__ typedef unsigned long long __u64;
  32. #endif
  33. /*
  34. * These aren't exported outside the kernel to avoid name space clashes
  35. */
  36. #ifdef __KERNEL__
  37. typedef signed char s8;
  38. typedef unsigned char u8;
  39. typedef signed short s16;
  40. typedef unsigned short u16;
  41. typedef signed int s32;
  42. typedef unsigned int u32;
  43. typedef signed long long s64;
  44. typedef unsigned long long u64;
  45. #define BITS_PER_LONG 32
  46. /* Dma addresses are 32-bits wide. */
  47. typedef u32 dma_addr_t;
  48. typedef unsigned long phys_addr_t;
  49. typedef unsigned long phys_size_t;
  50. #endif
  51. #endif