Lines Matching full:addr

17 extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
18 extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
49 static inline int is_pci_memory(u32 addr) in is_pci_memory() argument
51 return (addr >= pcibios_min_mem) && (addr <= 0x4FFFFFFF); in is_pci_memory()
80 u32 addr = (u32)p; in __indirect_writeb() local
83 if (!is_pci_memory(addr)) { in __indirect_writeb()
88 n = addr % 4; in __indirect_writeb()
91 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data); in __indirect_writeb()
105 u32 addr = (u32)p; in __indirect_writew() local
108 if (!is_pci_memory(addr)) { in __indirect_writew()
113 n = addr % 4; in __indirect_writew()
116 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data); in __indirect_writew()
130 u32 addr = (__force u32)p; in __indirect_writel() local
132 if (!is_pci_memory(addr)) { in __indirect_writel()
137 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value); in __indirect_writel()
150 u32 addr = (u32)p; in __indirect_readb() local
153 if (!is_pci_memory(addr)) in __indirect_readb()
156 n = addr % 4; in __indirect_readb()
158 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data)) in __indirect_readb()
175 u32 addr = (u32)p; in __indirect_readw() local
178 if (!is_pci_memory(addr)) in __indirect_readw()
181 n = addr % 4; in __indirect_readw()
183 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data)) in __indirect_readw()
200 u32 addr = (__force u32)p; in __indirect_readl() local
203 if (!is_pci_memory(addr)) in __indirect_readl()
206 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) in __indirect_readl()
246 static inline void outb(u8 value, u32 addr) in outb() argument
249 n = addr % 4; in outb()
252 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); in outb()
265 static inline void outw(u16 value, u32 addr) in outw() argument
268 n = addr % 4; in outw()
271 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); in outw()
283 static inline void outl(u32 value, u32 addr) in outl() argument
285 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value); in outl()
297 static inline u8 inb(u32 addr) in inb() argument
300 n = addr % 4; in inb()
302 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data)) in inb()
317 static inline u16 inw(u32 addr) in inw() argument
320 n = addr % 4; in inw()
322 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data)) in inw()
337 static inline u32 inl(u32 addr) in inl() argument
340 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data)) in inl()
361 static inline u8 ioread8(const void __iomem *addr) in ioread8() argument
363 unsigned long port = (unsigned long __force)addr; in ioread8()
368 return (unsigned int)__raw_readb(addr); in ioread8()
370 return (unsigned int)__indirect_readb(addr); in ioread8()
375 static inline void ioread8_rep(const void __iomem *addr, void *vaddr, u32 count) in ioread8_rep() argument
377 unsigned long port = (unsigned long __force)addr; in ioread8_rep()
382 __raw_readsb(addr, vaddr, count); in ioread8_rep()
384 __indirect_readsb(addr, vaddr, count); in ioread8_rep()
389 static inline u16 ioread16(const void __iomem *addr) in ioread16() argument
391 unsigned long port = (unsigned long __force)addr; in ioread16()
396 return le16_to_cpu((__force __le16)__raw_readw(addr)); in ioread16()
398 return (unsigned int)__indirect_readw(addr); in ioread16()
403 static inline void ioread16_rep(const void __iomem *addr, void *vaddr, in ioread16_rep() argument
406 unsigned long port = (unsigned long __force)addr; in ioread16_rep()
411 __raw_readsw(addr, vaddr, count); in ioread16_rep()
413 __indirect_readsw(addr, vaddr, count); in ioread16_rep()
418 static inline u32 ioread32(const void __iomem *addr) in ioread32() argument
420 unsigned long port = (unsigned long __force)addr; in ioread32()
425 return le32_to_cpu((__force __le32)__raw_readl(addr)); in ioread32()
427 return (unsigned int)__indirect_readl(addr); in ioread32()
433 static inline void ioread32_rep(const void __iomem *addr, void *vaddr, in ioread32_rep() argument
436 unsigned long port = (unsigned long __force)addr; in ioread32_rep()
441 __raw_readsl(addr, vaddr, count); in ioread32_rep()
443 __indirect_readsl(addr, vaddr, count); in ioread32_rep()
448 static inline void iowrite8(u8 value, void __iomem *addr) in iowrite8() argument
450 unsigned long port = (unsigned long __force)addr; in iowrite8()
455 __raw_writeb(value, addr); in iowrite8()
457 __indirect_writeb(value, addr); in iowrite8()
462 static inline void iowrite8_rep(void __iomem *addr, const void *vaddr, in iowrite8_rep() argument
465 unsigned long port = (unsigned long __force)addr; in iowrite8_rep()
470 __raw_writesb(addr, vaddr, count); in iowrite8_rep()
472 __indirect_writesb(addr, vaddr, count); in iowrite8_rep()
477 static inline void iowrite16(u16 value, void __iomem *addr) in iowrite16() argument
479 unsigned long port = (unsigned long __force)addr; in iowrite16()
484 __raw_writew(cpu_to_le16(value), addr); in iowrite16()
486 __indirect_writew(value, addr); in iowrite16()
491 static inline void iowrite16_rep(void __iomem *addr, const void *vaddr, in iowrite16_rep() argument
494 unsigned long port = (unsigned long __force)addr; in iowrite16_rep()
499 __raw_writesw(addr, vaddr, count); in iowrite16_rep()
501 __indirect_writesw(addr, vaddr, count); in iowrite16_rep()
506 static inline void iowrite32(u32 value, void __iomem *addr) in iowrite32() argument
508 unsigned long port = (unsigned long __force)addr; in iowrite32()
513 __raw_writel((u32 __force)cpu_to_le32(value), addr); in iowrite32()
515 __indirect_writel(value, addr); in iowrite32()
520 static inline void iowrite32_rep(void __iomem *addr, const void *vaddr, in iowrite32_rep() argument
523 unsigned long port = (unsigned long __force)addr; in iowrite32_rep()
528 __raw_writesl(addr, vaddr, count); in iowrite32_rep()
530 __indirect_writesl(addr, vaddr, count); in iowrite32_rep()
539 #define ioport_unmap(addr) ioport_unmap(addr) argument
540 static inline void ioport_unmap(void __iomem *addr) in ioport_unmap() argument