Lines Matching full:port
29 #define PORT2ADDR(port) _port2addr(port) argument
30 #define PORT2ADDR_NE(port) _port2addr_ne(port) argument
31 #define PORT2ADDR_USB(port) _port2addr_usb(port) argument
33 static inline void *_port2addr(unsigned long port) in _port2addr() argument
35 return (void *)(port | NONCACHE_OFFSET); in _port2addr()
39 static inline void *__port2addr_ata(unsigned long port) in __port2addr_ata() argument
43 switch (port) { in __port2addr_ata()
81 static inline void *_port2addr_ne(unsigned long port) in _port2addr_ne() argument
83 return (void *)(port + 0x10000000); in _port2addr_ne()
86 static inline void *_port2addr_usb(unsigned long port) in _port2addr_usb() argument
88 return (void *)(port + NONCACHE_OFFSET + 0x12000000); in _port2addr_usb()
127 unsigned char _inb(unsigned long port) in _inb() argument
129 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inb()
130 return _ne_inb(PORT2ADDR_NE(port)); in _inb()
132 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _inb()
133 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _inb()
134 return *(volatile unsigned char *)__port2addr_ata(port); in _inb()
138 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inb()
140 pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); in _inb()
144 return *(volatile unsigned char *)PORT2ADDR(port); in _inb()
147 unsigned short _inw(unsigned long port) in _inw() argument
149 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inw()
150 return _ne_inw(PORT2ADDR_NE(port)); in _inw()
152 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _inw()
153 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _inw()
154 return *(volatile unsigned short *)__port2addr_ata(port); in _inw()
158 else if (port >= 0x340 && port < 0x3a0) in _inw()
159 return *(volatile unsigned short *)PORT2ADDR_USB(port); in _inw()
163 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inw()
165 pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); in _inw()
169 return *(volatile unsigned short *)PORT2ADDR(port); in _inw()
172 unsigned long _inl(unsigned long port) in _inl() argument
175 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inl()
177 pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); in _inl()
181 return *(volatile unsigned long *)PORT2ADDR(port); in _inl()
184 unsigned char _inb_p(unsigned long port) in _inb_p() argument
186 unsigned char v = _inb(port); in _inb_p()
191 unsigned short _inw_p(unsigned long port) in _inw_p() argument
193 unsigned short v = _inw(port); in _inw_p()
198 unsigned long _inl_p(unsigned long port) in _inl_p() argument
200 unsigned long v = _inl(port); in _inl_p()
205 void _outb(unsigned char b, unsigned long port) in _outb() argument
207 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outb()
208 _ne_outb(b, PORT2ADDR_NE(port)); in _outb()
211 if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _outb()
212 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _outb()
213 *(volatile unsigned char *)__port2addr_ata(port) = b; in _outb()
217 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outb()
218 pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); in _outb()
221 *(volatile unsigned char *)PORT2ADDR(port) = b; in _outb()
224 void _outw(unsigned short w, unsigned long port) in _outw() argument
226 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outw()
227 _ne_outw(w, PORT2ADDR_NE(port)); in _outw()
230 if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _outw()
231 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _outw()
232 *(volatile unsigned short *)__port2addr_ata(port) = w; in _outw()
236 if (port >= 0x340 && port < 0x3a0) in _outw()
237 *(volatile unsigned short *)PORT2ADDR_USB(port) = w; in _outw()
241 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outw()
242 pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); in _outw()
245 *(volatile unsigned short *)PORT2ADDR(port) = w; in _outw()
248 void _outl(unsigned long l, unsigned long port) in _outl() argument
251 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outl()
252 pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); in _outl()
255 *(volatile unsigned long *)PORT2ADDR(port) = l; in _outl()
258 void _outb_p(unsigned char b, unsigned long port) in _outb_p() argument
260 _outb(b, port); in _outb_p()
264 void _outw_p(unsigned short w, unsigned long port) in _outw_p() argument
266 _outw(w, port); in _outw_p()
270 void _outl_p(unsigned long l, unsigned long port) in _outl_p() argument
272 _outl(l, port); in _outl_p()
276 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
278 if (port >= LAN_IOSTART && port < LAN_IOEND) in _insb()
279 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
281 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _insb()
282 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _insb()
284 unsigned char *portp = __port2addr_ata(port); in _insb()
290 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insb()
291 pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), in _insb()
297 unsigned char *portp = PORT2ADDR(port); in _insb()
303 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
308 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _insw()
309 portp = PORT2ADDR_NE(port); in _insw()
313 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insw()
314 pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), in _insw()
318 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _insw()
319 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _insw()
320 portp = __port2addr_ata(port); in _insw()
325 portp = PORT2ADDR(port); in _insw()
331 void _insl(unsigned int port, void * addr, unsigned long count) in _insl() argument
336 portp = PORT2ADDR(port); in _insl()
341 void _outsb(unsigned int port, const void * addr, unsigned long count) in _outsb() argument
346 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsb()
347 portp = PORT2ADDR_NE(port); in _outsb()
351 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _outsb()
352 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _outsb()
353 portp = __port2addr_ata(port); in _outsb()
358 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsb()
359 pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), in _outsb()
363 portp = PORT2ADDR(port); in _outsb()
369 void _outsw(unsigned int port, const void * addr, unsigned long count) in _outsw() argument
374 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsw()
375 portp = PORT2ADDR_NE(port); in _outsw()
379 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) || in _outsw()
380 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){ in _outsw()
381 portp = __port2addr_ata(port); in _outsw()
386 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsw()
387 pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), in _outsw()
391 portp = PORT2ADDR(port); in _outsw()
397 void _outsl(unsigned int port, const void * addr, unsigned long count) in _outsl() argument
402 portp = PORT2ADDR(port); in _outsl()