2005-04-17 06:20:36 +08:00
|
|
|
#include <linux/string.h>
|
|
|
|
#include <linux/module.h>
|
2008-02-17 21:41:16 +08:00
|
|
|
#include <asm/io.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-02-17 21:41:16 +08:00
|
|
|
void __memcpy_toio(unsigned long dst, const void *src, unsigned len)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2008-02-17 21:41:16 +08:00
|
|
|
__inline_memcpy((void *)dst, src, len);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(__memcpy_toio);
|
|
|
|
|
2008-02-17 21:41:16 +08:00
|
|
|
void __memcpy_fromio(void *dst, unsigned long src, unsigned len)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2008-02-17 21:41:16 +08:00
|
|
|
__inline_memcpy(dst, (const void *)src, len);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(__memcpy_fromio);
|
|
|
|
|
|
|
|
void memset_io(volatile void __iomem *a, int b, size_t c)
|
|
|
|
{
|
2008-02-17 21:41:16 +08:00
|
|
|
/*
|
|
|
|
* TODO: memset can mangle the IO patterns quite a bit.
|
|
|
|
* perhaps it would be better to use a dumb one:
|
|
|
|
*/
|
|
|
|
memset((void *)a, b, c);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(memset_io);
|