patch-hw_xfree86_common_compiler_h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Caller side code changes regarding memory mapped IO. This patch applies
  2. for mips architectures and is used by xf86-video-siliconmotion.
  3. --- xorg-server-1.7.6.orig/hw/xfree86/common/compiler.h 2010-03-12 05:38:22.000000000 +0100
  4. +++ xorg-server-1.7.6/hw/xfree86/common/compiler.h 2010-06-05 09:43:12.531809482 +0200
  5. @@ -713,42 +713,43 @@ xf86WriteMmio32LeNB(__volatile__ void *b
  6. # define PORT_SIZE short
  7. # endif
  8. -_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
  9. +_X_EXPORT volatile unsigned char *ioBase; /* Memory mapped I/O port area */
  10. +
  11. static __inline__ void
  12. outb(unsigned PORT_SIZE port, unsigned char val)
  13. {
  14. - *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
  15. + *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
  16. }
  17. static __inline__ void
  18. outw(unsigned PORT_SIZE port, unsigned short val)
  19. {
  20. - *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
  21. + *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
  22. }
  23. static __inline__ void
  24. outl(unsigned PORT_SIZE port, unsigned int val)
  25. {
  26. - *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
  27. + *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
  28. }
  29. static __inline__ unsigned int
  30. inb(unsigned PORT_SIZE port)
  31. {
  32. - return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase);
  33. + return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+ioBase);
  34. }
  35. static __inline__ unsigned int
  36. inw(unsigned PORT_SIZE port)
  37. {
  38. - return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase);
  39. + return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+ioBase);
  40. }
  41. static __inline__ unsigned int
  42. inl(unsigned PORT_SIZE port)
  43. {
  44. - return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase);
  45. + return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+ioBase);
  46. }