1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/module.h>
3 #include <linux/types.h>
8 * Copy data from IO memory space to "real" memory space.
9 * This needs to be optimized.
11 void memcpy_fromio(void *to
, const volatile void __iomem
*from
, long count
)
17 *dst
++ = readb(from
++);
20 EXPORT_SYMBOL(memcpy_fromio
);
23 * Copy data from "real" memory space to IO memory space.
24 * This needs to be optimized.
26 void memcpy_toio(volatile void __iomem
*to
, const void *from
, long count
)
28 const char *src
= from
;
35 EXPORT_SYMBOL(memcpy_toio
);
38 * "memset" on IO memory space.
39 * This needs to be optimized.
41 void memset_io(volatile void __iomem
*dst
, int c
, long count
)
43 unsigned char ch
= (char)(c
& 0xff);
51 EXPORT_SYMBOL(memset_io
);