types.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * (C) Copyright 2000 - 2002
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  18. * MA 02111-1307 USA
  19. *
  20. */
  21. #ifndef _SPARC_TYPES_H
  22. #define _SPARC_TYPES_H
  23. #ifndef __ASSEMBLY__
  24. typedef unsigned short umode_t;
  25. typedef __signed__ char __s8;
  26. typedef unsigned char __u8;
  27. typedef __signed__ short __s16;
  28. typedef unsigned short __u16;
  29. typedef __signed__ int __s32;
  30. typedef unsigned int __u32;
  31. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  32. typedef __signed__ long long __s64;
  33. typedef unsigned long long __u64;
  34. #endif
  35. typedef struct {
  36. __u32 u[4];
  37. } __attribute__((aligned(16))) vector128;
  38. #ifdef __KERNEL__
  39. /*
  40. * These aren't exported outside the kernel to avoid name space clashes
  41. */
  42. typedef signed char s8;
  43. typedef unsigned char u8;
  44. typedef signed short s16;
  45. typedef unsigned short u16;
  46. typedef signed int s32;
  47. typedef unsigned int u32;
  48. typedef signed long long s64;
  49. typedef unsigned long long u64;
  50. #define BITS_PER_LONG 32
  51. /* DMA addresses are 32-bits wide */
  52. typedef u32 dma_addr_t;
  53. typedef unsigned long phys_addr_t;
  54. typedef unsigned long phys_size_t;
  55. #endif /* __KERNEL__ */
  56. #endif /* __ASSEMBLY__ */
  57. #endif