Commit | Line | Data |
---|---|---|
1da177e4 | 1 | #include <linux/string.h> |
1da177e4 | 2 | #include <linux/module.h> |
4b44f810 | 3 | #include <asm/io.h> |
1da177e4 | 4 | |
4b44f810 | 5 | void __memcpy_toio(unsigned long dst, const void *src, unsigned len) |
1da177e4 | 6 | { |
4b44f810 | 7 | __inline_memcpy((void *)dst, src, len); |
1da177e4 LT |
8 | } |
9 | EXPORT_SYMBOL(__memcpy_toio); | |
10 | ||
4b44f810 | 11 | void __memcpy_fromio(void *dst, unsigned long src, unsigned len) |
1da177e4 | 12 | { |
4b44f810 | 13 | __inline_memcpy(dst, (const void *)src, len); |
1da177e4 LT |
14 | } |
15 | EXPORT_SYMBOL(__memcpy_fromio); | |
16 | ||
17 | void memset_io(volatile void __iomem *a, int b, size_t c) | |
18 | { | |
4b44f810 PC |
19 | /* |
20 | * TODO: memset can mangle the IO patterns quite a bit. | |
21 | * perhaps it would be better to use a dumb one: | |
22 | */ | |
23 | memset((void *)a, b, c); | |
1da177e4 LT |
24 | } |
25 | EXPORT_SYMBOL(memset_io); |