• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/m32r/kernel/

Lines Matching defs:port

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