Lines Matching refs:addr

52 #define IO_COND(addr, is_pio, is_mmio) do {			\  argument
53 unsigned long port = (unsigned long)addr; \
69 #define mmio_read16be(addr) be16_to_cpu(__raw_readw(addr)) argument
70 #define mmio_read32be(addr) be32_to_cpu(__raw_readl(addr)) argument
73 static inline unsigned int ioread8(void __iomem *addr) in ioread8() argument
75 IO_COND(addr, return inb(port), return readb(addr)); in ioread8()
78 static inline unsigned int ioread16(void __iomem *addr) in ioread16() argument
80 IO_COND(addr, return inw(port), return readw(addr)); in ioread16()
83 static inline unsigned int ioread16be(void __iomem *addr) in ioread16be() argument
85 IO_COND(addr, return pio_read16be(port), return mmio_read16be(addr)); in ioread16be()
88 static inline unsigned int ioread32(void __iomem *addr) in ioread32() argument
90 IO_COND(addr, return inl(port), return readl(addr)); in ioread32()
93 static inline unsigned int ioread32be(void __iomem *addr) in ioread32be() argument
95 IO_COND(addr, return pio_read32be(port), return mmio_read32be(addr)); in ioread32be()
109 static inline void iowrite8(u8 val, void __iomem *addr) in iowrite8() argument
111 IO_COND(addr, outb(val,port), writeb(val, addr)); in iowrite8()
113 static inline void iowrite16(u16 val, void __iomem *addr) in iowrite16() argument
115 IO_COND(addr, outw(val,port), writew(val, addr)); in iowrite16()
117 static inline void iowrite16be(u16 val, void __iomem *addr) in iowrite16be() argument
119 IO_COND(addr, pio_write16be(val,port), mmio_write16be(val, addr)); in iowrite16be()
121 static inline void iowrite32(u32 val, void __iomem *addr) in iowrite32() argument
123 IO_COND(addr, outl(val,port), writel(val, addr)); in iowrite32()
125 static inline void iowrite32be(u32 val, void __iomem *addr) in iowrite32be() argument
127 IO_COND(addr, pio_write32be(val,port), mmio_write32be(val, addr)); in iowrite32be()
137 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
140 u8 data = __raw_readb(addr); in mmio_insb()
145 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
148 u16 data = __raw_readw(addr); in mmio_insw()
153 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
156 u32 data = __raw_readl(addr); in mmio_insl()
164 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
167 __raw_writeb(*src, addr); in mmio_outsb()
171 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count) in mmio_outsw() argument
174 __raw_writew(*src, addr); in mmio_outsw()
178 static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count) in mmio_outsl() argument
181 __raw_writel(*src, addr); in mmio_outsl()
187 static inline void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) in ioread8_rep() argument
189 IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); in ioread8_rep()
191 static inline void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) in ioread16_rep() argument
193 IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count)); in ioread16_rep()
195 static inline void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) in ioread32_rep() argument
197 IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count)); in ioread32_rep()
200 static inline void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite8_rep() argument
202 IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count)); in iowrite8_rep()
204 static inline void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite16_rep() argument
206 IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count)); in iowrite16_rep()
208 static inline void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite32_rep() argument
210 IO_COND(addr, outsl(port, src,count), mmio_outsl(addr, src, count)); in iowrite32_rep()
221 static inline void ioport_unmap(void __iomem *addr) in ioport_unmap() argument
248 static inline void pci_iounmap(struct pci_dev *dev, void __iomem * addr) in pci_iounmap() argument
250 IO_COND(addr, /* nothing */, iounmap(addr)); in pci_iounmap()