@@ -58,10 +58,6 @@ static inline void ioport_unmap(void __iomem *p)
#define pci_iomap_wc pci_iomap_wc
#define pci_iomap_wc_range pci_iomap_wc_range
-#define memcpy_fromio(dst, src, count) zpci_memcpy_fromio(dst, src, count)
-#define memcpy_toio(dst, src, count) zpci_memcpy_toio(dst, src, count)
-#define memset_io(dst, val, count) zpci_memset_io(dst, val, count)
-
#define mmiowb() zpci_barrier()
#define __raw_readb zpci_read_u8
@@ -73,6 +69,10 @@ static inline void ioport_unmap(void __iomem *p)
#define __raw_writel zpci_write_u32
#define __raw_writeq zpci_write_u64
+#define memcpy_fromio memcpy_fromio
+#define memcpy_toio memcpy_toio
+#define memset_io memset_io
+
/* combine single writes by using store-block insn */
static inline void __iowrite32_copy(void __iomem *to, const void *from,
size_t count)
@@ -88,6 +88,25 @@ static inline void __iowrite64_copy(void __iomem *to, const void *from,
}
#define __iowrite64_copy __iowrite64_copy
+static inline void memcpy_fromio(void *dst, const volatile void __iomem *src,
+ size_t n)
+{
+ zpci_memcpy_fromio(dst, src, n);
+}
+
+static inline void memcpy_toio(volatile void __iomem *dst,
+ const void *src, size_t n)
+{
+ zpci_memcpy_toio(dst, src, n);
+}
+
+static inline void memset_io(volatile void __iomem *dst,
+ int val, size_t count)
+{
+ zpci_memset_io(dst, val, count);
+}
+
+
#endif /* CONFIG_PCI */
#include <asm-generic/io.h>
@@ -143,7 +143,7 @@ static inline int zpci_get_max_io_size(u64 src, u64 dst, int len, int max)
static inline int zpci_memcpy_fromio(void *dst,
const volatile void __iomem *src,
- unsigned long n)
+ size_t n)
{
int size, rc = 0;
@@ -162,7 +162,7 @@ static inline int zpci_memcpy_fromio(void *dst,
}
static inline int zpci_memcpy_toio(volatile void __iomem *dst,
- const void *src, unsigned long n)
+ const void *src, size_t n)
{
int size, rc = 0;
@@ -187,7 +187,7 @@ static inline int zpci_memcpy_toio(volatile void __iomem *dst,
}
static inline int zpci_memset_io(volatile void __iomem *dst,
- unsigned char val, size_t count)
+ int val, size_t count)
{
u8 *src = kmalloc(count, GFP_KERNEL);
int rc;