aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/io.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-03-01 14:22:29 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:50 -0400
commitfe00f943e0ef98b4057abcc2940d631a975b43cd (patch)
treec036ab8269ac86485130a083330229a01d319557 /include/asm-mips/io.h
parent14f18b7f7e58de9a34c4b5fd38d5f73f22fba7ac (diff)
Sparseify MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/io.h')
-rw-r--r--include/asm-mips/io.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index e03cb77b131c..cee0562a7851 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -25,6 +25,7 @@
25#include <asm/page.h> 25#include <asm/page.h>
26#include <asm/pgtable-bits.h> 26#include <asm/pgtable-bits.h>
27#include <asm/processor.h> 27#include <asm/processor.h>
28#include <asm/string.h>
28 29
29#include <mangle-port.h> 30#include <mangle-port.h>
30 31
@@ -217,7 +218,7 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
217 */ 218 */
218 if (flags == _CACHE_UNCACHED) 219 if (flags == _CACHE_UNCACHED)
219 base = (u64) IO_BASE; 220 base = (u64) IO_BASE;
220 return (void *) (unsigned long) (base + offset); 221 return (void __iomem *) (unsigned long) (base + offset);
221 } 222 }
222 223
223 return __ioremap(offset, size, flags); 224 return __ioremap(offset, size, flags);
@@ -486,9 +487,18 @@ BUILDSTRING(q, u64)
486/* Depends on MIPS II instruction set */ 487/* Depends on MIPS II instruction set */
487#define mmiowb() asm volatile ("sync" ::: "memory") 488#define mmiowb() asm volatile ("sync" ::: "memory")
488 489
489#define memset_io(a,b,c) memset((void *)(a),(b),(c)) 490static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
490#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) 491{
491#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) 492 memset((void __force *) addr, val, count);
493}
494static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
495{
496 memcpy(dst, (void __force *) src, count);
497}
498static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
499{
500 memcpy((void __force *) dst, src, count);
501}
492 502
493/* 503/*
494 * Memory Mapped I/O 504 * Memory Mapped I/O