|
@@ -376,3 +376,58 @@ static inline void ioread16_rep(const void __iomem *addr, void *vaddr,
|
|
|
#else
|
|
|
__indirect_readsw(addr, vaddr, count);
|
|
|
#endif
|
|
|
+}
|
|
|
+
|
|
|
+#define ioread32(p) ioread32(p)
|
|
|
+static inline unsigned int ioread32(const void __iomem *addr)
|
|
|
+{
|
|
|
+ unsigned long port = (unsigned long __force)addr;
|
|
|
+ if (__is_io_address(port))
|
|
|
+ return (unsigned int)inl(port & PIO_MASK);
|
|
|
+ else {
|
|
|
+#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
|
|
+ return le32_to_cpu((__force __le32)__raw_readl(addr));
|
|
|
+#else
|
|
|
+ return (unsigned int)__indirect_readl(addr);
|
|
|
+#endif
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+#define ioread32_rep(p, v, c) ioread32_rep(p, v, c)
|
|
|
+static inline void ioread32_rep(const void __iomem *addr, void *vaddr,
|
|
|
+ u32 count)
|
|
|
+{
|
|
|
+ unsigned long port = (unsigned long __force)addr;
|
|
|
+ if (__is_io_address(port))
|
|
|
+ insl(port & PIO_MASK, vaddr, count);
|
|
|
+ else
|
|
|
+#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
|
|
+ __raw_readsl(addr, vaddr, count);
|
|
|
+#else
|
|
|
+ __indirect_readsl(addr, vaddr, count);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#define iowrite8(v, p) iowrite8(v, p)
|
|
|
+static inline void iowrite8(u8 value, void __iomem *addr)
|
|
|
+{
|
|
|
+ unsigned long port = (unsigned long __force)addr;
|
|
|
+ if (__is_io_address(port))
|
|
|
+ outb(value, port & PIO_MASK);
|
|
|
+ else
|
|
|
+#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|
|
|
+ __raw_writeb(value, addr);
|
|
|
+#else
|
|
|
+ __indirect_writeb(value, addr);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#define iowrite8_rep(p, v, c) iowrite8_rep(p, v, c)
|
|
|
+static inline void iowrite8_rep(void __iomem *addr, const void *vaddr,
|
|
|
+ u32 count)
|
|
|
+{
|
|
|
+ unsigned long port = (unsigned long __force)addr;
|
|
|
+ if (__is_io_address(port))
|
|
|
+ outsb(port & PIO_MASK, vaddr, count);
|
|
|
+ else
|
|
|
+#ifndef CONFIG_IXP4XX_INDIRECT_PCI
|