tx4938_mips.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * linux/include/asm-mips/tx4938/tx4938_mips.h
  3. * Generic bitmask definitions
  4. *
  5. * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
  6. * terms of the GNU General Public License version 2. This program is
  7. * licensed "as is" without any warranty of any kind, whether express
  8. * or implied.
  9. *
  10. * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
  11. */
  12. #ifndef TX4938_TX4938_MIPS_H
  13. #define TX4938_TX4938_MIPS_H
  14. #ifndef __ASSEMBLY__
  15. #define reg_rd08(r) ((u8 )(*((vu8 *)(r))))
  16. #define reg_rd16(r) ((u16)(*((vu16*)(r))))
  17. #define reg_rd32(r) ((u32)(*((vu32*)(r))))
  18. #define reg_rd64(r) ((u64)(*((vu64*)(r))))
  19. #define reg_wr08(r,v) ((*((vu8 *)(r)))=((u8 )(v)))
  20. #define reg_wr16(r,v) ((*((vu16*)(r)))=((u16)(v)))
  21. #define reg_wr32(r,v) ((*((vu32*)(r)))=((u32)(v)))
  22. #define reg_wr64(r,v) ((*((vu64*)(r)))=((u64)(v)))
  23. typedef volatile __signed char vs8;
  24. typedef volatile unsigned char vu8;
  25. typedef volatile __signed short vs16;
  26. typedef volatile unsigned short vu16;
  27. typedef volatile __signed int vs32;
  28. typedef volatile unsigned int vu32;
  29. typedef s8 s08;
  30. typedef vs8 vs08;
  31. typedef u8 u08;
  32. typedef vu8 vu08;
  33. #if (_MIPS_SZLONG == 64)
  34. typedef volatile __signed__ long vs64;
  35. typedef volatile unsigned long vu64;
  36. #else
  37. typedef volatile __signed__ long long vs64;
  38. typedef volatile unsigned long long vu64;
  39. #endif
  40. #endif
  41. #endif