Lines Matching full:addr

51 #define IO_COND(addr, is_pio, is_mmio) do {			\  argument
52 unsigned long port = (unsigned long __force)addr; \
68 #define mmio_read16be(addr) swab16(readw(addr)) argument
69 #define mmio_read32be(addr) swab32(readl(addr)) argument
70 #define mmio_read64be(addr) swab64(readq(addr)) argument
73 unsigned int ioread8(const void __iomem *addr) in ioread8() argument
75 IO_COND(addr, return inb(port), return readb(addr)); in ioread8()
78 unsigned int ioread16(const void __iomem *addr) in ioread16() argument
80 IO_COND(addr, return inw(port), return readw(addr)); in ioread16()
83 unsigned int ioread16be(const void __iomem *addr) in ioread16be() argument
85 IO_COND(addr, return pio_read16be(port), return mmio_read16be(addr)); in ioread16be()
88 unsigned int ioread32(const void __iomem *addr) in ioread32() argument
90 IO_COND(addr, return inl(port), return readl(addr)); in ioread32()
93 unsigned int ioread32be(const void __iomem *addr) in ioread32be() argument
95 IO_COND(addr, return pio_read32be(port), return mmio_read32be(addr)); in ioread32be()
145 u64 ioread64_lo_hi(const void __iomem *addr) in ioread64_lo_hi() argument
147 IO_COND(addr, return pio_read64_lo_hi(port), return readq(addr)); in ioread64_lo_hi()
151 u64 ioread64_hi_lo(const void __iomem *addr) in ioread64_hi_lo() argument
153 IO_COND(addr, return pio_read64_hi_lo(port), return readq(addr)); in ioread64_hi_lo()
157 u64 ioread64be_lo_hi(const void __iomem *addr) in ioread64be_lo_hi() argument
159 IO_COND(addr, return pio_read64be_lo_hi(port), in ioread64be_lo_hi()
160 return mmio_read64be(addr)); in ioread64be_lo_hi()
164 u64 ioread64be_hi_lo(const void __iomem *addr) in ioread64be_hi_lo() argument
166 IO_COND(addr, return pio_read64be_hi_lo(port), in ioread64be_hi_lo()
167 return mmio_read64be(addr)); in ioread64be_hi_lo()
189 void iowrite8(u8 val, void __iomem *addr) in iowrite8() argument
191 IO_COND(addr, outb(val,port), writeb(val, addr)); in iowrite8()
193 void iowrite16(u16 val, void __iomem *addr) in iowrite16() argument
195 IO_COND(addr, outw(val,port), writew(val, addr)); in iowrite16()
197 void iowrite16be(u16 val, void __iomem *addr) in iowrite16be() argument
199 IO_COND(addr, pio_write16be(val,port), mmio_write16be(val, addr)); in iowrite16be()
201 void iowrite32(u32 val, void __iomem *addr) in iowrite32() argument
203 IO_COND(addr, outl(val,port), writel(val, addr)); in iowrite32()
205 void iowrite32be(u32 val, void __iomem *addr) in iowrite32be() argument
207 IO_COND(addr, pio_write32be(val,port), mmio_write32be(val, addr)); in iowrite32be()
240 void iowrite64_lo_hi(u64 val, void __iomem *addr) in iowrite64_lo_hi() argument
242 IO_COND(addr, pio_write64_lo_hi(val, port), in iowrite64_lo_hi()
243 writeq(val, addr)); in iowrite64_lo_hi()
246 void iowrite64_hi_lo(u64 val, void __iomem *addr) in iowrite64_hi_lo() argument
248 IO_COND(addr, pio_write64_hi_lo(val, port), in iowrite64_hi_lo()
249 writeq(val, addr)); in iowrite64_hi_lo()
252 void iowrite64be_lo_hi(u64 val, void __iomem *addr) in iowrite64be_lo_hi() argument
254 IO_COND(addr, pio_write64be_lo_hi(val, port), in iowrite64be_lo_hi()
255 mmio_write64be(val, addr)); in iowrite64be_lo_hi()
258 void iowrite64be_hi_lo(u64 val, void __iomem *addr) in iowrite64be_hi_lo() argument
260 IO_COND(addr, pio_write64be_hi_lo(val, port), in iowrite64be_hi_lo()
261 mmio_write64be(val, addr)); in iowrite64be_hi_lo()
278 static inline void mmio_insb(const void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
281 u8 data = __raw_readb(addr); in mmio_insb()
286 static inline void mmio_insw(const void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
289 u16 data = __raw_readw(addr); in mmio_insw()
294 static inline void mmio_insl(const void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
297 u32 data = __raw_readl(addr); in mmio_insl()
305 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
308 __raw_writeb(*src, addr); in mmio_outsb()
312 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count) in mmio_outsw() argument
315 __raw_writew(*src, addr); in mmio_outsw()
319 static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count) in mmio_outsl() argument
322 __raw_writel(*src, addr); in mmio_outsl()
328 void ioread8_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread8_rep() argument
330 IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); in ioread8_rep()
332 void ioread16_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread16_rep() argument
334 IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count)); in ioread16_rep()
336 void ioread32_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread32_rep() argument
338 IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count)); in ioread32_rep()
344 void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite8_rep() argument
346 IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count)); in iowrite8_rep()
348 void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite16_rep() argument
350 IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count)); in iowrite16_rep()
352 void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite32_rep() argument
354 IO_COND(addr, outsl(port, src,count), mmio_outsl(addr, src, count)); in iowrite32_rep()
369 void ioport_unmap(void __iomem *addr) in ioport_unmap() argument
380 void pci_iounmap(struct pci_dev *dev, void __iomem * addr) in pci_iounmap() argument
382 IO_COND(addr, /* nothing */, iounmap(addr)); in pci_iounmap()