* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / arm / lib / io.c
bloba7720eca115ac85ff5bc5ecf1daccd8c71625ccd
1 #include <linux/module.h>
3 #include <asm/io.h>
5 /*
6 * Copy data from IO memory space to "real" memory space.
7 * This needs to be optimized.
8 */
9 void _memcpy_fromio(void * to, unsigned long from, unsigned long count)
11 while (count) {
12 count--;
13 *(char *) to = readb(from);
14 ((char *) to)++;
15 from++;
20 * Copy data from "real" memory space to IO memory space.
21 * This needs to be optimized.
23 void _memcpy_toio(unsigned long to, const void * from, unsigned long count)
25 while (count) {
26 count--;
27 writeb(*(char *) from, to);
28 ((char *) from)++;
29 to++;
34 * "memset" on IO memory space.
35 * This needs to be optimized.
37 void _memset_io(unsigned long dst, int c, unsigned long count)
39 while (count) {
40 count--;
41 writeb(c, dst);
42 dst++;
46 EXPORT_SYMBOL(_memcpy_fromio);
47 EXPORT_SYMBOL(_memcpy_toio);
48 EXPORT_SYMBOL(_memset_io);