summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/io.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /include/asm-sparc64/io.h
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'include/asm-sparc64/io.h')
-rw-r--r--include/asm-sparc64/io.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index 0c137b72d..f8bdaa826 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.32 2000/02/15 10:04:54 jj Exp $ */
+/* $Id: io.h,v 1.33 2000/02/25 05:47:38 davem Exp $ */
#ifndef __SPARC64_IO_H
#define __SPARC64_IO_H
@@ -225,10 +225,8 @@ extern __inline__ void _sbus_writel(unsigned int l, unsigned long addr)
#define sbus_writew(__w, __addr) (_sbus_writew((__w), (unsigned long)(__addr)))
#define sbus_writel(__l, __addr) (_sbus_writel((__l), (unsigned long)(__addr)))
-static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
+static inline void *_sbus_memset_io(unsigned long dst, int c, __kernel_size_t n)
{
- unsigned long dst = (unsigned long)__dst;
-
while(n--) {
sbus_writeb(c, dst);
dst++;
@@ -236,8 +234,11 @@ static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
return (void *) dst;
}
+#define sbus_memset_io(d,c,sz) \
+ _sbus_memset_io((unsigned long)d,(int)c,(__kernel_size_t)sz)
+
static inline void *
-memset_io(void *dst, int c, __kernel_size_t n)
+_memset_io(void *dst, int c, __kernel_size_t n)
{
char *d = dst;
@@ -249,8 +250,11 @@ memset_io(void *dst, int c, __kernel_size_t n)
return dst;
}
+#define memset_io(d,c,sz) \
+ _memset_io((void *)d,(int)c,(__kernel_size_t)sz)
+
static inline void *
-memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
+_memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
{
char *d = dst;
@@ -263,8 +267,11 @@ memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
return dst;
}
+#define memcpy_fromio(d,s,sz) \
+ _memcpy_fromio((void *)d,(unsigned long)s,(__kernel_size_t)sz)
+
static inline void *
-memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
+_memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
{
const char *s = src;
unsigned long d = dst;
@@ -277,6 +284,9 @@ memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
return (void *)dst;
}
+#define memcpy_toio(d,s,sz) \
+ _memcpy_toio((unsigned long)d,(const void *)s,(__kernel_size_t)sz)
+
static inline int check_signature(unsigned long io_addr,
const unsigned char *signature,
int length)