Lines Matching refs:port
39 #define PORT2ADDR(port) _port2addr(port) argument
41 static inline void *_port2addr(unsigned long port) in _port2addr() argument
44 if (port >= UART0_IOSTART && port <= UART0_IOEND) in _port2addr()
45 port = ((port - UART0_IOSTART) << 1) + UART0_REGSTART; in _port2addr()
46 else if (port >= UART1_IOSTART && port <= UART1_IOEND) in _port2addr()
47 port = ((port - UART1_IOSTART) << 1) + UART1_REGSTART; in _port2addr()
49 return (void *)(port | (NONCACHE_OFFSET)); in _port2addr()
57 unsigned char _inb(unsigned long port) in _inb() argument
59 if (port >= CFC_IOSTART && port <= CFC_IOEND) { in _inb()
61 pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); in _inb()
64 return *(volatile unsigned char *)PORT2ADDR(port); in _inb()
67 unsigned short _inw(unsigned long port) in _inw() argument
69 if (port >= CFC_IOSTART && port <= CFC_IOEND) { in _inw()
71 pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); in _inw()
74 return *(volatile unsigned short *)PORT2ADDR(port); in _inw()
77 unsigned long _inl(unsigned long port) in _inl() argument
79 if (port >= CFC_IOSTART && port <= CFC_IOEND) { in _inl()
81 pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); in _inl()
84 return *(volatile unsigned long *)PORT2ADDR(port); in _inl()
87 unsigned char _inb_p(unsigned long port) in _inb_p() argument
89 unsigned char v = _inb(port); in _inb_p()
94 unsigned short _inw_p(unsigned long port) in _inw_p() argument
96 unsigned short v = _inw(port); in _inw_p()
101 unsigned long _inl_p(unsigned long port) in _inl_p() argument
103 unsigned long v = _inl(port); in _inl_p()
108 void _outb(unsigned char b, unsigned long port) in _outb() argument
110 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _outb()
111 pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); in _outb()
113 *(volatile unsigned char *)PORT2ADDR(port) = b; in _outb()
116 void _outw(unsigned short w, unsigned long port) in _outw() argument
118 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _outw()
119 pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); in _outw()
121 *(volatile unsigned short *)PORT2ADDR(port) = w; in _outw()
124 void _outl(unsigned long l, unsigned long port) in _outl() argument
126 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _outl()
127 pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); in _outl()
129 *(volatile unsigned long *)PORT2ADDR(port) = l; in _outl()
132 void _outb_p(unsigned char b, unsigned long port) in _outb_p() argument
134 _outb(b, port); in _outb_p()
138 void _outw_p(unsigned short w, unsigned long port) in _outw_p() argument
140 _outw(w, port); in _outw_p()
144 void _outl_p(unsigned long l, unsigned long port) in _outl_p() argument
146 _outl(l, port); in _outl_p()
150 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
152 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _insb()
153 pcc_ioread_byte(0, port, addr, sizeof(unsigned char), count, 1); in _insb()
156 unsigned char *portp = PORT2ADDR(port); in _insb()
162 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
167 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _insw()
168 pcc_ioread_word(0, port, addr, sizeof(unsigned short), count, in _insw()
171 portp = PORT2ADDR(port); in _insw()
177 void _insl(unsigned int port, void * addr, unsigned long count) in _insl() argument
182 portp = PORT2ADDR(port); in _insl()
187 void _outsb(unsigned int port, const void * addr, unsigned long count) in _outsb() argument
192 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _outsb()
193 pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), in _outsb()
196 portp = PORT2ADDR(port); in _outsb()
202 void _outsw(unsigned int port, const void * addr, unsigned long count) in _outsw() argument
207 if (port >= CFC_IOSTART && port <= CFC_IOEND) in _outsw()
208 pcc_iowrite_word(0, port, (void *)addr, sizeof(unsigned short), in _outsw()
211 portp = PORT2ADDR(port); in _outsw()
217 void _outsl(unsigned int port, const void * addr, unsigned long count) in _outsl() argument
222 portp = PORT2ADDR(port); in _outsl()