Lines Matching refs:port

223 extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
224 extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
225 extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
226 extern _X_EXPORT unsigned int _inb(unsigned long port);
227 extern _X_EXPORT unsigned int _inw(unsigned long port);
228 extern _X_EXPORT unsigned int _inl(unsigned long port);
231 outb(unsigned long port, unsigned char val)
233 _outb(val, port);
237 outw(unsigned long port, unsigned short val)
239 _outw(val, port);
243 outl(unsigned long port, unsigned int val)
245 _outl(val, port);
249 inb(unsigned long port)
251 return _inb(port);
255 inw(unsigned long port)
257 return _inw(port);
261 inl(unsigned long port)
263 return _inl(port);
276 extern _X_EXPORT void outb(unsigned int port, unsigned char val);
277 extern _X_EXPORT void outw(unsigned int port, unsigned short val);
278 extern _X_EXPORT void outl(unsigned int port, unsigned int val);
279 extern _X_EXPORT unsigned char inb(unsigned int port);
280 extern _X_EXPORT unsigned short inw(unsigned int port);
281 extern _X_EXPORT unsigned int inl(unsigned int port);
294 outb(unsigned short port, unsigned char val)
296 __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port));
300 outw(unsigned short port, unsigned short val)
302 __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port));
306 outl(unsigned short port, unsigned int val)
308 __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port));
312 inb(unsigned short port)
315 __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port));
321 inw(unsigned short port)
324 __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port));
330 inl(unsigned short port)
333 __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port));
345 outb(unsigned long port, unsigned char val)
348 :"r"(val), "r"(port), "i"(ASI_PL));
354 outw(unsigned long port, unsigned short val)
357 :"r"(val), "r"(port), "i"(ASI_PL));
363 outl(unsigned long port, unsigned int val)
366 :"r"(val), "r"(port), "i"(ASI_PL));
372 inb(unsigned long port)
376 :"r"(port), "i"(ASI_PL));
382 inw(unsigned long port)
386 :"r"(port), "i"(ASI_PL));
392 inl(unsigned long port)
396 :"r"(port), "i"(ASI_PL));
528 _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
531 outb(unsigned PORT_SIZE port, unsigned char val)
533 *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
538 outw(unsigned PORT_SIZE port, unsigned short val)
540 *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
545 outl(unsigned PORT_SIZE port, unsigned int val)
547 *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
552 inb(unsigned PORT_SIZE port)
554 return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
559 inw(unsigned PORT_SIZE port)
561 return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
566 inl(unsigned PORT_SIZE port)
568 return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
714 outb(unsigned short port, unsigned char value)
718 xf86WriteMmio8((void *) ioBase, port, value);
722 outw(unsigned short port, unsigned short value)
726 xf86WriteMmio16Le((void *) ioBase, port, value);
730 outl(unsigned short port, unsigned int value)
734 xf86WriteMmio32Le((void *) ioBase, port, value);
738 inb(unsigned short port)
742 return xf86ReadMmio8((void *) ioBase, port);
746 inw(unsigned short port)
750 return xf86ReadMmio16Le((void *) ioBase, port);
754 inl(unsigned short port)
758 return xf86ReadMmio32Le((void *) ioBase, port);
770 xf_outb(unsigned short port, unsigned char val)
772 outb(val, port);
776 xf_outw(unsigned short port, unsigned short val)
778 outw(val, port);
782 xf_outl(unsigned short port, unsigned int val)
784 outl(val, port);
794 * Assume all port access are aligned. We need to revise this implementation
795 * if there is unaligned port access.
893 outb(unsigned PORT_SIZE port, unsigned char val)
895 xf86WriteMmio8(IOPortBase, port, val);
899 outw(unsigned PORT_SIZE port, unsigned short val)
901 xf86WriteMmio16Swap(IOPortBase, port, val);
905 outl(unsigned PORT_SIZE port, unsigned int val)
907 xf86WriteMmio32Swap(IOPortBase, port, val);
911 inb(unsigned PORT_SIZE port)
913 return xf86ReadMmio8(IOPortBase, port);
917 inw(unsigned PORT_SIZE port)
919 return xf86ReadMmio16Swap(IOPortBase, port);
923 inl(unsigned PORT_SIZE port)
925 return xf86ReadMmio32Swap(IOPortBase, port);
930 outb(unsigned PORT_SIZE port, unsigned char val)
932 *(volatile unsigned char *) (((unsigned PORT_SIZE) (port))) = val;
937 outw(unsigned PORT_SIZE port, unsigned short val)
939 *(volatile unsigned short *) (((unsigned PORT_SIZE) (port))) = val;
944 outl(unsigned PORT_SIZE port, unsigned int val)
946 *(volatile unsigned int *) (((unsigned PORT_SIZE) (port))) = val;
951 inb(unsigned PORT_SIZE port)
953 return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)));
957 inw(unsigned PORT_SIZE port)
959 return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)));
963 inl(unsigned PORT_SIZE port)
965 return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)));
973 outb(unsigned short port, unsigned char val)
975 __asm__ __volatile__("out%B0 (%1)"::"a"(val), "d"(port));
979 outw(unsigned short port, unsigned short val)
981 __asm__ __volatile__("out%W0 (%1)"::"a"(val), "d"(port));
985 outl(unsigned short port, unsigned int val)
987 __asm__ __volatile__("out%L0 (%1)"::"a"(val), "d"(port));
991 inb(unsigned short port)
994 __asm__ __volatile__("in%B0 (%1)":"=a"(ret):"d"(port));
1000 inw(unsigned short port)
1003 __asm__ __volatile__("in%W0 (%1)":"=a"(ret):"d"(port));
1009 inl(unsigned short port)
1012 __asm__ __volatile__("in%L0 (%1)":"=a"(ret):"d"(port));
1151 * This avoids port I/O during the copy (which causes problems with