aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-02-13 23:59:02 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-02-14 00:25:37 -0500
commitc0ca41a27ef40fbe6d5fe343b61d63d7e1b93d28 (patch)
tree74a2f477952051693e80ea5f66a15ac6c52204a5 /include/asm-sh
parente036eaa681a17f71b64f6d9040fe605555623919 (diff)
sh: fix ioreadN_rep and iowriteN_rep
This patch is a fix to make sure readsN/writesN are used over insN/outsN for ioreadN_rep/iowriteN_rep. The current state of the sh io code is that mmio operations like readN/writeN and ioreadN/iowriteN are unaffected by the value of generic_io_base. This is different fom port based io like inN/outN which gets adjusted using the value in generic_io_base. Without this patch ioreadN_rep/iowriteN_rep get their addresses adjusted. The address for mmio access is adjusted using generic_io_base. This is wrong. The ata core code currently crashes if generic_io_base is set. This patch changes ioreadN_rep/iowriteN_rep to follow the same rules as the rest of the mmio operations, ie don't adjust using generic_io_base. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/io.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 3d2b114f9d57..356e50d06745 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -182,13 +182,13 @@ __BUILD_MEMORY_STRING(w, u16)
182#define iowrite32(v,a) writel((v),(a)) 182#define iowrite32(v,a) writel((v),(a))
183#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) 183#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a))
184 184
185#define ioread8_rep(a,d,c) insb((a),(d),(c)) 185#define ioread8_rep(a, d, c) readsb((a), (d), (c))
186#define ioread16_rep(a,d,c) insw((a),(d),(c)) 186#define ioread16_rep(a, d, c) readsw((a), (d), (c))
187#define ioread32_rep(a,d,c) insl((a),(d),(c)) 187#define ioread32_rep(a, d, c) readsl((a), (d), (c))
188 188
189#define iowrite8_rep(a,s,c) outsb((a),(s),(c)) 189#define iowrite8_rep(a, s, c) writesb((a), (s), (c))
190#define iowrite16_rep(a,s,c) outsw((a),(s),(c)) 190#define iowrite16_rep(a, s, c) writesw((a), (s), (c))
191#define iowrite32_rep(a,s,c) outsl((a),(s),(c)) 191#define iowrite32_rep(a, s, c) writesl((a), (s), (c))
192 192
193#define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ 193#define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */
194 194