Lines Matching full:port

29 #define PORT2ADDR(port)  _port2addr(port)  argument
31 static inline void *_port2addr(unsigned long port) in _port2addr() argument
33 return (void *)(port | NONCACHE_OFFSET); in _port2addr()
36 static inline void *_port2addr_ne(unsigned long port) in _port2addr_ne() argument
38 return (void *)((port<<1) + NONCACHE_OFFSET + 0x0C000000); in _port2addr_ne()
50 #define PORT2ADDR_NE(port) _port2addr_ne(port) argument
75 unsigned char _inb(unsigned long port) in _inb() argument
77 if (port >= 0x300 && port < 0x320) in _inb()
78 return _ne_inb(PORT2ADDR_NE(port)); in _inb()
81 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inb()
83 pcc_ioread(0, port, &b, sizeof(b), 1, 0); in _inb()
85 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _inb()
87 pcc_ioread(1, port, &b, sizeof(b), 1, 0); in _inb()
92 return *(volatile unsigned char *)PORT2ADDR(port); in _inb()
95 unsigned short _inw(unsigned long port) in _inw() argument
97 if (port >= 0x300 && port < 0x320) in _inw()
98 return _ne_inw(PORT2ADDR_NE(port)); in _inw()
101 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inw()
103 pcc_ioread(0, port, &w, sizeof(w), 1, 0); in _inw()
105 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _inw()
107 pcc_ioread(1, port, &w, sizeof(w), 1, 0); in _inw()
111 return *(volatile unsigned short *)PORT2ADDR(port); in _inw()
114 unsigned long _inl(unsigned long port) in _inl() argument
117 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _inl()
119 pcc_ioread(0, port, &l, sizeof(l), 1, 0); in _inl()
121 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _inl()
123 pcc_ioread(1, port, &l, sizeof(l), 1, 0); in _inl()
127 return *(volatile unsigned long *)PORT2ADDR(port); in _inl()
130 unsigned char _inb_p(unsigned long port) in _inb_p() argument
132 unsigned char v = _inb(port); in _inb_p()
137 unsigned short _inw_p(unsigned long port) in _inw_p() argument
139 unsigned short v = _inw(port); in _inw_p()
144 unsigned long _inl_p(unsigned long port) in _inl_p() argument
146 unsigned long v = _inl(port); in _inl_p()
151 void _outb(unsigned char b, unsigned long port) in _outb() argument
153 if (port >= 0x300 && port < 0x320) in _outb()
154 _ne_outb(b, PORT2ADDR_NE(port)); in _outb()
157 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outb()
158 pcc_iowrite(0, port, &b, sizeof(b), 1, 0); in _outb()
159 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _outb()
160 pcc_iowrite(1, port, &b, sizeof(b), 1, 0); in _outb()
163 *(volatile unsigned char *)PORT2ADDR(port) = b; in _outb()
166 void _outw(unsigned short w, unsigned long port) in _outw() argument
168 if (port >= 0x300 && port < 0x320) in _outw()
169 _ne_outw(w, PORT2ADDR_NE(port)); in _outw()
172 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outw()
173 pcc_iowrite(0, port, &w, sizeof(w), 1, 0); in _outw()
174 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _outw()
175 pcc_iowrite(1, port, &w, sizeof(w), 1, 0); in _outw()
178 *(volatile unsigned short *)PORT2ADDR(port) = w; in _outw()
181 void _outl(unsigned long l, unsigned long port) in _outl() argument
184 if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outl()
185 pcc_iowrite(0, port, &l, sizeof(l), 1, 0); in _outl()
186 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _outl()
187 pcc_iowrite(1, port, &l, sizeof(l), 1, 0); in _outl()
190 *(volatile unsigned long *)PORT2ADDR(port) = l; in _outl()
193 void _outb_p(unsigned char b, unsigned long port) in _outb_p() argument
195 _outb(b, port); in _outb_p()
199 void _outw_p(unsigned short w, unsigned long port) in _outw_p() argument
201 _outw(w, port); in _outw_p()
205 void _outl_p(unsigned long l, unsigned long port) in _outl_p() argument
207 _outl(l, port); in _outl_p()
211 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
216 if (port >= 0x300 && port < 0x320){ in _insb()
217 portp = PORT2ADDR_NE(port); in _insb()
221 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insb()
222 pcc_ioread(0, port, (void *)addr, sizeof(unsigned char), in _insb()
224 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _insb()
225 pcc_ioread(1, port, (void *)addr, sizeof(unsigned char), in _insb()
229 portp = PORT2ADDR(port); in _insb()
235 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
240 if (port >= 0x300 && port < 0x320) { in _insw()
241 portp = PORT2ADDR_NE(port); in _insw()
245 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _insw()
246 pcc_ioread(0, port, (void *)addr, sizeof(unsigned short), in _insw()
248 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _insw()
249 pcc_ioread(1, port, (void *)addr, sizeof(unsigned short), in _insw()
253 portp = PORT2ADDR(port); in _insw()
259 void _insl(unsigned int port, void *addr, unsigned long count) in _insl() argument
264 portp = PORT2ADDR(port); in _insl()
269 void _outsb(unsigned int port, const void *addr, unsigned long count) in _outsb() argument
274 if (port >= 0x300 && port < 0x320) { in _outsb()
275 portp = PORT2ADDR_NE(port); in _outsb()
279 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsb()
280 pcc_iowrite(0, port, (void *)addr, sizeof(unsigned char), in _outsb()
282 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _outsb()
283 pcc_iowrite(1, port, (void *)addr, sizeof(unsigned char), in _outsb()
287 portp = PORT2ADDR(port); in _outsb()
293 void _outsw(unsigned int port, const void *addr, unsigned long count) in _outsw() argument
298 if (port >= 0x300 && port < 0x320) { in _outsw()
299 portp = PORT2ADDR_NE(port); in _outsw()
303 } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { in _outsw()
304 pcc_iowrite(0, port, (void *)addr, sizeof(unsigned short), in _outsw()
306 } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { in _outsw()
307 pcc_iowrite(1, port, (void *)addr, sizeof(unsigned short), in _outsw()
311 portp = PORT2ADDR(port); in _outsw()
317 void _outsl(unsigned int port, const void *addr, unsigned long count) in _outsl() argument
322 portp = PORT2ADDR(port); in _outsl()