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()
61 static inline void *_port2addr_ne(unsigned long port) in _port2addr_ne() argument
63 return (void *)(port + 0x10000000); in _port2addr_ne()
66 static inline void *_port2addr_ne(unsigned long port) in _port2addr_ne() argument
68 return (void *)(port + 0x04000000); in _port2addr_ne()
71 static inline void *_port2addr_usb(unsigned long port) in _port2addr_usb() argument
73 return (void *)(port + NONCACHE_OFFSET + 0x14000000); in _port2addr_usb()
112 unsigned char _inb(unsigned long port) in _inb() argument
114 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inb()
115 return _ne_inb(PORT2ADDR_NE(port)); in _inb()
117 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _inb()
118 return *(volatile unsigned char *)__port2addr_ata(port); in _inb()
122 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inb()
124 pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); in _inb()
129 return *(volatile unsigned char *)PORT2ADDR(port); in _inb()
132 unsigned short _inw(unsigned long port) in _inw() argument
134 if (port >= LAN_IOSTART && port < LAN_IOEND) in _inw()
135 return _ne_inw(PORT2ADDR_NE(port)); in _inw()
137 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _inw()
138 return *(volatile unsigned short *)__port2addr_ata(port); in _inw()
142 else if (port >= 0x340 && port < 0x3a0) in _inw()
143 return *(volatile unsigned short *)PORT2ADDR_USB(port); in _inw()
147 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inw()
149 pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); in _inw()
153 return *(volatile unsigned short *)PORT2ADDR(port); in _inw()
156 unsigned long _inl(unsigned long port) in _inl() argument
159 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inl()
161 pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); in _inl()
165 return *(volatile unsigned long *)PORT2ADDR(port); in _inl()
168 unsigned char _inb_p(unsigned long port) in _inb_p() argument
170 unsigned char v = _inb(port); in _inb_p()
175 unsigned short _inw_p(unsigned long port) in _inw_p() argument
177 unsigned short v = _inw(port); in _inw_p()
182 unsigned long _inl_p(unsigned long port) in _inl_p() argument
184 unsigned long v = _inl(port); in _inl_p()
189 void _outb(unsigned char b, unsigned long port) in _outb() argument
191 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outb()
192 _ne_outb(b, PORT2ADDR_NE(port)); in _outb()
195 if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _outb()
196 *(volatile unsigned char *)__port2addr_ata(port) = b; in _outb()
200 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outb()
201 pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); in _outb()
204 *(volatile unsigned char *)PORT2ADDR(port) = b; in _outb()
207 void _outw(unsigned short w, unsigned long port) in _outw() argument
209 if (port >= LAN_IOSTART && port < LAN_IOEND) in _outw()
210 _ne_outw(w, PORT2ADDR_NE(port)); in _outw()
213 if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _outw()
214 *(volatile unsigned short *)__port2addr_ata(port) = w; in _outw()
218 if (port >= 0x340 && port < 0x3a0) in _outw()
219 *(volatile unsigned short *)PORT2ADDR_USB(port) = w; in _outw()
223 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outw()
224 pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); in _outw()
227 *(volatile unsigned short *)PORT2ADDR(port) = w; in _outw()
230 void _outl(unsigned long l, unsigned long port) in _outl() argument
233 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outl()
234 pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); in _outl()
237 *(volatile unsigned long *)PORT2ADDR(port) = l; in _outl()
240 void _outb_p(unsigned char b, unsigned long port) in _outb_p() argument
242 _outb(b, port); in _outb_p()
246 void _outw_p(unsigned short w, unsigned long port) in _outw_p() argument
248 _outw(w, port); in _outw_p()
252 void _outl_p(unsigned long l, unsigned long port) in _outl_p() argument
254 _outl(l, port); in _outl_p()
258 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
260 if (port >= LAN_IOSTART && port < LAN_IOEND) in _insb()
261 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
263 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _insb()
265 unsigned char *portp = __port2addr_ata(port); in _insb()
271 else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insb()
272 pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), in _insb()
278 unsigned char *portp = PORT2ADDR(port); in _insb()
284 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
289 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _insw()
290 portp = PORT2ADDR_NE(port); in _insw()
294 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insw()
295 pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), in _insw()
299 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _insw()
300 portp = __port2addr_ata(port); in _insw()
305 portp = PORT2ADDR(port); in _insw()
311 void _insl(unsigned int port, void * addr, unsigned long count) in _insl() argument
316 portp = PORT2ADDR(port); in _insl()
321 void _outsb(unsigned int port, const void * addr, unsigned long count) in _outsb() argument
326 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsb()
327 portp = PORT2ADDR_NE(port); in _outsb()
331 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _outsb()
332 portp = __port2addr_ata(port); in _outsb()
337 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsb()
338 pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), in _outsb()
342 portp = PORT2ADDR(port); in _outsb()
348 void _outsw(unsigned int port, const void * addr, unsigned long count) in _outsw() argument
353 if (port >= LAN_IOSTART && port < LAN_IOEND) { in _outsw()
354 portp = PORT2ADDR_NE(port); in _outsw()
358 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { in _outsw()
359 portp = __port2addr_ata(port); in _outsw()
364 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsw()
365 pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), in _outsw()
369 portp = PORT2ADDR(port); in _outsw()
375 void _outsl(unsigned int port, const void * addr, unsigned long count) in _outsl() argument
380 portp = PORT2ADDR(port); in _outsl()