Lines Matching refs:port

30 #define PORT2ADDR(port)  _port2addr(port)  argument
32 static inline void *_port2addr(unsigned long port) in _port2addr() argument
34 return (void *)(port | NONCACHE_OFFSET); in _port2addr()
38 static inline void *__port2addr_ata(unsigned long port) in __port2addr_ata() argument
42 switch (port) { in __port2addr_ata()
64 static inline void *_port2addr_ne(unsigned long port) in _port2addr_ne() argument
66 return (void *)(port + NONCACHE_OFFSET + 0x01000000); in _port2addr_ne()
78 #define PORT2ADDR_NE(port) _port2addr_ne(port) argument
108 unsigned char _inb(unsigned long port) in _inb() argument
110 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inb()
111 return _ne_inb(PORT2ADDR_NE(port)); in _inb()
113 return *(volatile unsigned char *)PORT2ADDR(port); in _inb()
116 unsigned short _inw(unsigned long port) in _inw() argument
118 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inw()
119 return _ne_inw(PORT2ADDR_NE(port)); in _inw()
121 return *(volatile unsigned short *)PORT2ADDR(port); in _inw()
124 unsigned long _inl(unsigned long port) in _inl() argument
126 return *(volatile unsigned long *)PORT2ADDR(port); in _inl()
129 unsigned char _inb_p(unsigned long port) in _inb_p() argument
131 unsigned char v = _inb(port); in _inb_p()
136 unsigned short _inw_p(unsigned long port) in _inw_p() argument
138 unsigned short v = _inw(port); in _inw_p()
143 unsigned long _inl_p(unsigned long port) in _inl_p() argument
145 unsigned long v = _inl(port); in _inl_p()
150 void _outb(unsigned char b, unsigned long port) in _outb() argument
152 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outb()
153 _ne_outb(b, PORT2ADDR_NE(port)); in _outb()
155 *(volatile unsigned char *)PORT2ADDR(port) = b; in _outb()
158 void _outw(unsigned short w, unsigned long port) in _outw() argument
160 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outw()
161 _ne_outw(w, PORT2ADDR_NE(port)); in _outw()
163 *(volatile unsigned short *)PORT2ADDR(port) = w; in _outw()
166 void _outl(unsigned long l, unsigned long port) in _outl() argument
168 *(volatile unsigned long *)PORT2ADDR(port) = l; in _outl()
171 void _outb_p(unsigned char b, unsigned long port) in _outb_p() argument
173 _outb(b, port); in _outb_p()
177 void _outw_p(unsigned short w, unsigned long port) in _outw_p() argument
179 _outw(w, port); in _outw_p()
183 void _outl_p(unsigned long l, unsigned long port) in _outl_p() argument
185 _outl(l, port); in _outl_p()
189 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
191 if (port >= LAN_IOSTART && port < LAN_IOEND) in _insb()
192 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
195 unsigned char *portp = PORT2ADDR(port); in _insb()
201 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
206 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _insw()
211 portp = PORT2ADDR_NE(port); in _insw()
215 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insw()
216 pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), in _insw()
220 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _insw()
221 portp = __port2addr_ata(port); in _insw()
226 portp = PORT2ADDR(port); in _insw()
232 void _insl(unsigned int port, void *addr, unsigned long count) in _insl() argument
237 portp = PORT2ADDR(port); in _insl()
242 void _outsb(unsigned int port, const void *addr, unsigned long count) in _outsb() argument
247 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsb()
248 portp = PORT2ADDR_NE(port); in _outsb()
252 portp = PORT2ADDR(port); in _outsb()
258 void _outsw(unsigned int port, const void *addr, unsigned long count) in _outsw() argument
263 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsw()
268 portp = PORT2ADDR_NE(port); in _outsw()
272 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _outsw()
273 portp = __port2addr_ata(port); in _outsw()
278 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsw()
279 pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), in _outsw()
283 portp = PORT2ADDR(port); in _outsw()
289 void _outsl(unsigned int port, const void *addr, unsigned long count) in _outsl() argument
294 portp = PORT2ADDR(port); in _outsl()