diff options
Diffstat (limited to 'arch/sh/include/asm/io.h')
-rw-r--r-- | arch/sh/include/asm/io.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 25348141674b..5be45ea4dfec 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -92,8 +92,12 @@ | |||
92 | 92 | ||
93 | static inline void ctrl_delay(void) | 93 | static inline void ctrl_delay(void) |
94 | { | 94 | { |
95 | #ifdef P2SEG | 95 | #ifdef CONFIG_CPU_SH4 |
96 | __raw_readw(CCN_PVR); | ||
97 | #elif defined(P2SEG) | ||
96 | __raw_readw(P2SEG); | 98 | __raw_readw(P2SEG); |
99 | #else | ||
100 | #error "Need a dummy address for delay" | ||
97 | #endif | 101 | #endif |
98 | } | 102 | } |
99 | 103 | ||
@@ -146,6 +150,7 @@ __BUILD_MEMORY_STRING(q, u64) | |||
146 | #define readl_relaxed(a) readl(a) | 150 | #define readl_relaxed(a) readl(a) |
147 | #define readq_relaxed(a) readq(a) | 151 | #define readq_relaxed(a) readq(a) |
148 | 152 | ||
153 | #ifndef CONFIG_GENERIC_IOMAP | ||
149 | /* Simple MMIO */ | 154 | /* Simple MMIO */ |
150 | #define ioread8(a) __raw_readb(a) | 155 | #define ioread8(a) __raw_readb(a) |
151 | #define ioread16(a) __raw_readw(a) | 156 | #define ioread16(a) __raw_readw(a) |
@@ -166,6 +171,15 @@ __BUILD_MEMORY_STRING(q, u64) | |||
166 | #define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c)) | 171 | #define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c)) |
167 | #define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c)) | 172 | #define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c)) |
168 | #define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c)) | 173 | #define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c)) |
174 | #endif | ||
175 | |||
176 | #define mmio_insb(p,d,c) __raw_readsb(p,d,c) | ||
177 | #define mmio_insw(p,d,c) __raw_readsw(p,d,c) | ||
178 | #define mmio_insl(p,d,c) __raw_readsl(p,d,c) | ||
179 | |||
180 | #define mmio_outsb(p,s,c) __raw_writesb(p,s,c) | ||
181 | #define mmio_outsw(p,s,c) __raw_writesw(p,s,c) | ||
182 | #define mmio_outsl(p,s,c) __raw_writesl(p,s,c) | ||
169 | 183 | ||
170 | /* synco on SH-4A, otherwise a nop */ | 184 | /* synco on SH-4A, otherwise a nop */ |
171 | #define mmiowb() wmb() | 185 | #define mmiowb() wmb() |