Lines Matching defs:port
81 outb(unsigned long port, char val)
83 __asm__ __volatile__("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL));
87 outw(unsigned long port, char val)
89 __asm__ __volatile__("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL));
93 outl(unsigned long port, char val)
95 __asm__ __volatile__("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL));
99 inb(unsigned long port)
102 __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
107 inw(unsigned long port)
110 __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
115 inl(unsigned long port)
118 __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
123 extern unsigned int IOPortBase; /* Memory mapped I/O port area */
126 outb(short port, char val)
128 if ((unsigned short)port >= 0x400) return;
130 *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase) = val;
134 outw(short port, short val)
136 if ((unsigned short)port >= 0x400) return;
138 *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase) = val;
142 outl(short port, int val)
144 if ((unsigned short)port >= 0x400) return;
146 *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase) = val;
150 inb(short port)
152 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
154 return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
158 inw(short port)
160 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
162 return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
166 inl(short port)
168 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
170 return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
177 extern void outb(u_int32_t port, u_int8_t val);
178 extern void outw(u_int32_t port, u_int16_t val);
179 extern void outl(u_int32_t port, u_int32_t val);
180 extern u_int8_t inb(u_int32_t port);
181 extern u_int16_t inw(u_int32_t port);
182 extern u_int32_t inl(u_int32_t port);
187 outb(short port, char val)
189 __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
195 __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
199 outl(short port, unsigned int val)
201 __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
205 inb(short port)
210 "d" (port));
215 inw(short port)
220 "d" (port));
225 inl(short port)
230 "d" (port));
237 outb(short port, char val)
239 __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port));
243 outw(short port, short val)
245 __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port));
249 outl(short port, unsigned int val)
251 __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port));
255 inb(short port)
260 "d" (port));
265 inw(short port)
270 "d" (port));
275 inl(short port)
280 "d" (port));