Lines Matching full:addr

52 #define IO_COND(addr, is_pio, is_mmio) do {			\  argument
53 unsigned long port = (unsigned long __force)addr; \
69 #define mmio_read16be(addr) swab16(readw(addr)) argument
70 #define mmio_read32be(addr) swab32(readl(addr)) argument
71 #define mmio_read64be(addr) swab64(readq(addr)) argument
79 unsigned int ioread8(const void __iomem *addr) in ioread8() argument
81 IO_COND(addr, return inb(port), return readb(addr)); in ioread8()
85 unsigned int ioread16(const void __iomem *addr) in ioread16() argument
87 IO_COND(addr, return inw(port), return readw(addr)); in ioread16()
91 unsigned int ioread16be(const void __iomem *addr) in ioread16be() argument
93 IO_COND(addr, return pio_read16be(port), return mmio_read16be(addr)); in ioread16be()
97 unsigned int ioread32(const void __iomem *addr) in ioread32() argument
99 IO_COND(addr, return inl(port), return readl(addr)); in ioread32()
103 unsigned int ioread32be(const void __iomem *addr) in ioread32be() argument
105 IO_COND(addr, return pio_read32be(port), return mmio_read32be(addr)); in ioread32be()
156 u64 ioread64_lo_hi(const void __iomem *addr) in ioread64_lo_hi() argument
158 IO_COND(addr, return pio_read64_lo_hi(port), return readq(addr)); in ioread64_lo_hi()
163 u64 ioread64_hi_lo(const void __iomem *addr) in ioread64_hi_lo() argument
165 IO_COND(addr, return pio_read64_hi_lo(port), return readq(addr)); in ioread64_hi_lo()
170 u64 ioread64be_lo_hi(const void __iomem *addr) in ioread64be_lo_hi() argument
172 IO_COND(addr, return pio_read64be_lo_hi(port), in ioread64be_lo_hi()
173 return mmio_read64be(addr)); in ioread64be_lo_hi()
178 u64 ioread64be_hi_lo(const void __iomem *addr) in ioread64be_hi_lo() argument
180 IO_COND(addr, return pio_read64be_hi_lo(port), in ioread64be_hi_lo()
181 return mmio_read64be(addr)); in ioread64be_hi_lo()
203 void iowrite8(u8 val, void __iomem *addr) in iowrite8() argument
207 IO_COND(addr, outb(val,port), writeb(val, addr)); in iowrite8()
209 void iowrite16(u16 val, void __iomem *addr) in iowrite16() argument
213 IO_COND(addr, outw(val,port), writew(val, addr)); in iowrite16()
215 void iowrite16be(u16 val, void __iomem *addr) in iowrite16be() argument
219 IO_COND(addr, pio_write16be(val,port), mmio_write16be(val, addr)); in iowrite16be()
221 void iowrite32(u32 val, void __iomem *addr) in iowrite32() argument
225 IO_COND(addr, outl(val,port), writel(val, addr)); in iowrite32()
227 void iowrite32be(u32 val, void __iomem *addr) in iowrite32be() argument
231 IO_COND(addr, pio_write32be(val,port), mmio_write32be(val, addr)); in iowrite32be()
264 void iowrite64_lo_hi(u64 val, void __iomem *addr) in iowrite64_lo_hi() argument
268 IO_COND(addr, pio_write64_lo_hi(val, port), in iowrite64_lo_hi()
269 writeq(val, addr)); in iowrite64_lo_hi()
272 void iowrite64_hi_lo(u64 val, void __iomem *addr) in iowrite64_hi_lo() argument
276 IO_COND(addr, pio_write64_hi_lo(val, port), in iowrite64_hi_lo()
277 writeq(val, addr)); in iowrite64_hi_lo()
280 void iowrite64be_lo_hi(u64 val, void __iomem *addr) in iowrite64be_lo_hi() argument
284 IO_COND(addr, pio_write64be_lo_hi(val, port), in iowrite64be_lo_hi()
285 mmio_write64be(val, addr)); in iowrite64be_lo_hi()
288 void iowrite64be_hi_lo(u64 val, void __iomem *addr) in iowrite64be_hi_lo() argument
292 IO_COND(addr, pio_write64be_hi_lo(val, port), in iowrite64be_hi_lo()
293 mmio_write64be(val, addr)); in iowrite64be_hi_lo()
310 static inline void mmio_insb(const void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
313 u8 data = __raw_readb(addr); in mmio_insb()
318 static inline void mmio_insw(const void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
321 u16 data = __raw_readw(addr); in mmio_insw()
326 static inline void mmio_insl(const void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
329 u32 data = __raw_readl(addr); in mmio_insl()
337 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
340 __raw_writeb(*src, addr); in mmio_outsb()
344 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count) in mmio_outsw() argument
347 __raw_writew(*src, addr); in mmio_outsw()
351 static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count) in mmio_outsl() argument
354 __raw_writel(*src, addr); in mmio_outsl()
360 void ioread8_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread8_rep() argument
362 IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); in ioread8_rep()
366 void ioread16_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread16_rep() argument
368 IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count)); in ioread16_rep()
372 void ioread32_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread32_rep() argument
374 IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count)); in ioread32_rep()
382 void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite8_rep() argument
386 IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count)); in iowrite8_rep()
388 void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite16_rep() argument
392 IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count)); in iowrite16_rep()
394 void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite32_rep() argument
398 IO_COND(addr, outsl(port, src,count), mmio_outsl(addr, src, count)); in iowrite32_rep()
413 void ioport_unmap(void __iomem *addr) in ioport_unmap() argument
424 void pci_iounmap(struct pci_dev *dev, void __iomem * addr) in pci_iounmap() argument
426 IO_COND(addr, /* nothing */, iounmap(addr)); in pci_iounmap()