Lines Matching refs:port
38 static void bad_io_access(unsigned long port, const char *access) in bad_io_access() argument
43 WARN(1, KERN_ERR "Bad IO access at port %#lx (%s)\n", port, access); in bad_io_access()
51 unsigned long port = (unsigned long __force)addr; \
52 if (port >= PIO_RESERVED) { \
54 } else if (port > PIO_OFFSET) { \
55 port &= PIO_MASK; \
58 bad_io_access(port, #is_pio ); \
62 #define pio_read16be(port) swab16(inw(port)) argument
63 #define pio_read32be(port) swab32(inl(port)) argument
73 IO_COND(addr, return inb(port), return readb(addr)); in ioread8()
78 IO_COND(addr, return inw(port), return readw(addr)); in ioread16()
83 IO_COND(addr, return pio_read16be(port), return mmio_read16be(addr)); in ioread16be()
88 IO_COND(addr, return inl(port), return readl(addr)); in ioread32()
93 IO_COND(addr, return pio_read32be(port), return mmio_read32be(addr)); in ioread32be()
103 #define pio_write16be(val,port) outw(swab16(val),port) argument
104 #define pio_write32be(val,port) outl(swab32(val),port) argument
108 #define mmio_write16be(val,port) __raw_writew(be16_to_cpu(val),port) argument
109 #define mmio_write32be(val,port) __raw_writel(be32_to_cpu(val),port) argument
114 IO_COND(addr, outb(val,port), writeb(val, addr)); in iowrite8()
118 IO_COND(addr, outw(val,port), writew(val, addr)); in iowrite16()
122 IO_COND(addr, pio_write16be(val,port), mmio_write16be(val, addr)); in iowrite16be()
126 IO_COND(addr, outl(val,port), writel(val, addr)); in iowrite32()
130 IO_COND(addr, pio_write32be(val,port), mmio_write32be(val, addr)); in iowrite32be()
197 IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); in ioread8_rep()
201 IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count)); in ioread16_rep()
205 IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count)); in ioread32_rep()
213 IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count)); in iowrite8_rep()
217 IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count)); in iowrite16_rep()
221 IO_COND(addr, outsl(port, src,count), mmio_outsl(addr, src, count)); in iowrite32_rep()
229 void __iomem *ioport_map(unsigned long port, unsigned int nr) in ioport_map() argument
231 if (port > PIO_MASK) in ioport_map()
233 return (void __iomem *) (unsigned long) (port + PIO_OFFSET); in ioport_map()