Commit ee0f2f9e authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2131/1: Add _iomem to the IO string functions

Patch from Ben Dooks

This patch stops mtd from generating problems of
casting pointers to ints, due to the memcpy_fromio
and related functions all taking `unsigned long`
for their IO addresses.

Replace `unsigned long` with `void __iomem *`

Compiled clean on arch-s3c2410

Signed-off-by: Ben Dooks 
parent 9b9407e8
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copy data from IO memory space to "real" memory space. * Copy data from IO memory space to "real" memory space.
* This needs to be optimized. * This needs to be optimized.
*/ */
void _memcpy_fromio(void *to, unsigned long from, size_t count) void _memcpy_fromio(void *to, void __iomem *from, size_t count)
{ {
unsigned char *t = to; unsigned char *t = to;
while (count) { while (count) {
...@@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, unsigned long from, size_t count) ...@@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, unsigned long from, size_t count)
* Copy data from "real" memory space to IO memory space. * Copy data from "real" memory space to IO memory space.
* This needs to be optimized. * This needs to be optimized.
*/ */
void _memcpy_toio(unsigned long to, const void *from, size_t count) void _memcpy_toio(void __iomem *to, const void *from, size_t count)
{ {
const unsigned char *f = from; const unsigned char *f = from;
while (count) { while (count) {
...@@ -37,7 +37,7 @@ void _memcpy_toio(unsigned long to, const void *from, size_t count) ...@@ -37,7 +37,7 @@ void _memcpy_toio(unsigned long to, const void *from, size_t count)
* "memset" on IO memory space. * "memset" on IO memory space.
* This needs to be optimized. * This needs to be optimized.
*/ */
void _memset_io(unsigned long dst, int c, size_t count) void _memset_io(void __iomem *dst, int c, size_t count)
{ {
while (count) { while (count) {
count--; count--;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* 04-Apr-1999 PJB Added check_signature. * 04-Apr-1999 PJB Added check_signature.
* 12-Dec-1999 RMK More cleanups * 12-Dec-1999 RMK More cleanups
* 18-Jun-2000 RMK Removed virt_to_* and friends definitions * 18-Jun-2000 RMK Removed virt_to_* and friends definitions
* 05-Oct-2004 BJD Moved memory string functions to use void __iomem
*/ */
#ifndef __ASM_ARM_IO_H #ifndef __ASM_ARM_IO_H
#define __ASM_ARM_IO_H #define __ASM_ARM_IO_H
...@@ -131,9 +132,9 @@ extern void __readwrite_bug(const char *fn); ...@@ -131,9 +132,9 @@ extern void __readwrite_bug(const char *fn);
/* /*
* String version of IO memory access ops: * String version of IO memory access ops:
*/ */
extern void _memcpy_fromio(void *, unsigned long, size_t); extern void _memcpy_fromio(void *, void __iomem *, size_t);
extern void _memcpy_toio(unsigned long, const void *, size_t); extern void _memcpy_toio(void __iomem *, const void *, size_t);
extern void _memset_io(unsigned long, int, size_t); extern void _memset_io(void __iomem *, int, size_t);
/* /*
* Memory access primitives * Memory access primitives
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment