ARM: call machine_shutdown() from machine_halt(), etc
[linux/fpc-iii.git] / arch / arm / kernel / io.c
blobf4470307edb8f4a9a3327e700d620de1f9124616
1 #include <linux/module.h>
2 #include <linux/types.h>
3 #include <linux/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, const volatile void __iomem *from, size_t count)
11 unsigned char *t = to;
12 while (count) {
13 count--;
14 *t = readb(from);
15 t++;
16 from++;
21 * Copy data from "real" memory space to IO memory space.
22 * This needs to be optimized.
24 void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
26 const unsigned char *f = from;
27 while (count) {
28 count--;
29 writeb(*f, to);
30 f++;
31 to++;
36 * "memset" on IO memory space.
37 * This needs to be optimized.
39 void _memset_io(volatile void __iomem *dst, int c, size_t count)
41 while (count) {
42 count--;
43 writeb(c, dst);
44 dst++;
48 EXPORT_SYMBOL(_memcpy_fromio);
49 EXPORT_SYMBOL(_memcpy_toio);
50 EXPORT_SYMBOL(_memset_io);