blob: c94a2ba075fbb0b853f569a61c95ab39a8b9bc1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include <asm/io.h>
/*
* Copy data from IO memory space to "real" memory space.
* This needs to be optimized.
*/
void _memcpy_fromio(void * to, unsigned long from, unsigned long count)
{
while (count) {
count--;
*(char *) to = readb(from);
((char *) to)++;
from++;
}
}
/*
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
void _memcpy_toio(unsigned long to, const void * from, unsigned long count)
{
while (count) {
count--;
writeb(*(char *) from, to);
((char *) from)++;
to++;
}
}
/*
* "memset" on IO memory space.
* This needs to be optimized.
*/
void _memset_io(unsigned long dst, int c, unsigned long count)
{
while (count) {
count--;
writeb(c, dst);
dst++;
}
}
|