diff options
Diffstat (limited to 'include/asm-v850')
-rw-r--r-- | include/asm-v850/io.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/include/asm-v850/io.h b/include/asm-v850/io.h index bb5efd1b4b7d..cc364fcbec10 100644 --- a/include/asm-v850/io.h +++ b/include/asm-v850/io.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-v850/io.h -- Misc I/O operations | 2 | * include/asm-v850/io.h -- Misc I/O operations |
3 | * | 3 | * |
4 | * Copyright (C) 2001,02,03,04 NEC Electronics Corporation | 4 | * Copyright (C) 2001,02,03,04,05 NEC Electronics Corporation |
5 | * Copyright (C) 2001,02,03,04 Miles Bader <miles@gnu.org> | 5 | * Copyright (C) 2001,02,03,04,05 Miles Bader <miles@gnu.org> |
6 | * | 6 | * |
7 | * This file is subject to the terms and conditions of the GNU General | 7 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file COPYING in the main directory of this | 8 | * Public License. See the file COPYING in the main directory of this |
@@ -27,12 +27,12 @@ | |||
27 | #define readw_relaxed(a) readw(a) | 27 | #define readw_relaxed(a) readw(a) |
28 | #define readl_relaxed(a) readl(a) | 28 | #define readl_relaxed(a) readl(a) |
29 | 29 | ||
30 | #define writeb(b, addr) \ | 30 | #define writeb(val, addr) \ |
31 | (void)((*(volatile unsigned char *) (addr)) = (b)) | 31 | (void)((*(volatile unsigned char *) (addr)) = (val)) |
32 | #define writew(b, addr) \ | 32 | #define writew(val, addr) \ |
33 | (void)((*(volatile unsigned short *) (addr)) = (b)) | 33 | (void)((*(volatile unsigned short *) (addr)) = (val)) |
34 | #define writel(b, addr) \ | 34 | #define writel(val, addr) \ |
35 | (void)((*(volatile unsigned int *) (addr)) = (b)) | 35 | (void)((*(volatile unsigned int *) (addr)) = (val)) |
36 | 36 | ||
37 | #define __raw_readb readb | 37 | #define __raw_readb readb |
38 | #define __raw_readw readw | 38 | #define __raw_readw readw |
@@ -96,11 +96,22 @@ outsl (unsigned long port, const void *src, unsigned long count) | |||
96 | outl (*p++, port); | 96 | outl (*p++, port); |
97 | } | 97 | } |
98 | 98 | ||
99 | #define iounmap(addr) ((void)0) | 99 | |
100 | #define ioremap(physaddr, size) (physaddr) | 100 | /* Some places try to pass in an loff_t for PHYSADDR (?!), so we cast it to |
101 | #define ioremap_nocache(physaddr, size) (physaddr) | 101 | long before casting it to a pointer to avoid compiler warnings. */ |
102 | #define ioremap_writethrough(physaddr, size) (physaddr) | 102 | #define ioremap(physaddr, size) ((void __iomem *)(unsigned long)(physaddr)) |
103 | #define ioremap_fullcache(physaddr, size) (physaddr) | 103 | #define iounmap(addr) ((void)0) |
104 | |||
105 | #define ioremap_nocache(physaddr, size) ioremap (physaddr, size) | ||
106 | #define ioremap_writethrough(physaddr, size) ioremap (physaddr, size) | ||
107 | #define ioremap_fullcache(physaddr, size) ioremap (physaddr, size) | ||
108 | |||
109 | #define ioread8(addr) readb (addr) | ||
110 | #define ioread16(addr) readw (addr) | ||
111 | #define ioread32(addr) readl (addr) | ||
112 | #define iowrite8(val, addr) writeb (val, addr) | ||
113 | #define iowrite16(val, addr) writew (val, addr) | ||
114 | #define iowrite32(val, addr) writel (val, addr) | ||
104 | 115 | ||
105 | #define mmiowb() | 116 | #define mmiowb() |
106 | 117 | ||