types.h 2.1 KB

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