-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
* Copy data from IO memory space to "real" memory space.
* This needs to be optimized.
*/
-void
-__ia64_memcpy_fromio (void *to, unsigned long from, long count)
+void memcpy_fromio(void *to, const volatile void __iomem *from, long count)
{
char *dst = to;
*dst++ = readb(from++);
}
}
-EXPORT_SYMBOL(__ia64_memcpy_fromio);
+EXPORT_SYMBOL(memcpy_fromio);
/*
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
-void
-__ia64_memcpy_toio (unsigned long to, void *from, long count)
+void memcpy_toio(volatile void __iomem *to, const void *from, long count)
{
- char *src = from;
+ const char *src = from;
while (count) {
count--;
writeb(*src++, to++);
}
}
-EXPORT_SYMBOL(__ia64_memcpy_toio);
+EXPORT_SYMBOL(memcpy_toio);
/*
* "memset" on IO memory space.
* This needs to be optimized.
*/
-void
-__ia64_memset_c_io (unsigned long dst, unsigned long c, long count)
+void memset_io(volatile void __iomem *dst, int c, long count)
{
unsigned char ch = (char)(c & 0xff);
dst++;
}
}
-EXPORT_SYMBOL(__ia64_memset_c_io);
+EXPORT_SYMBOL(memset_io);
#ifdef CONFIG_IA64_GENERIC
#undef __ia64_writew
#undef __ia64_writel
#undef __ia64_writeq
+#undef __ia64_mmiowb
unsigned int
__ia64_inb (unsigned long port)
}
unsigned char
-__ia64_readb (void *addr)
+__ia64_readb (void __iomem *addr)
{
return ___ia64_readb (addr);
}
unsigned short
-__ia64_readw (void *addr)
+__ia64_readw (void __iomem *addr)
{
return ___ia64_readw (addr);
}
unsigned int
-__ia64_readl (void *addr)
+__ia64_readl (void __iomem *addr)
{
return ___ia64_readl (addr);
}
unsigned long
-__ia64_readq (void *addr)
+__ia64_readq (void __iomem *addr)
{
return ___ia64_readq (addr);
}
unsigned char
-__ia64_readb_relaxed (void *addr)
+__ia64_readb_relaxed (void __iomem *addr)
{
return ___ia64_readb (addr);
}
unsigned short
-__ia64_readw_relaxed (void *addr)
+__ia64_readw_relaxed (void __iomem *addr)
{
return ___ia64_readw (addr);
}
unsigned int
-__ia64_readl_relaxed (void *addr)
+__ia64_readl_relaxed (void __iomem *addr)
{
return ___ia64_readl (addr);
}
unsigned long
-__ia64_readq_relaxed (void *addr)
+__ia64_readq_relaxed (void __iomem *addr)
{
return ___ia64_readq (addr);
}
+void
+__ia64_mmiowb(void)
+{
+ ___ia64_mmiowb();
+}
+
#endif /* CONFIG_IA64_GENERIC */