Commit 29ef8295327653ff09a56285c35213cd31fa54b3
Committed by
Kyle McMartin
1 parent
857600c771
Exists in
master
and in
7 other branches
[PARISC] Enable ioremap functionality unconditionally
Enable CONFIG_HPPA_IOREMAP by default and remove all now unnecessary code. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Showing 3 changed files with 3 additions and 82 deletions Side-by-side Diff
arch/parisc/Kconfig
... | ... | @@ -138,17 +138,6 @@ |
138 | 138 | enable this option otherwise. The 64bit kernel is significantly bigger |
139 | 139 | and slower than the 32bit one. |
140 | 140 | |
141 | -config HPPA_IOREMAP | |
142 | - bool "Enable IOREMAP functionality (EXPERIMENTAL)" | |
143 | - depends on EXPERIMENTAL | |
144 | - default n | |
145 | - help | |
146 | - Enable this option if you want to enable real IOREMAPPING on PA-RISC. | |
147 | - Currently we just "simulate" I/O remapping, and enabling this option | |
148 | - will just crash your machine. | |
149 | - | |
150 | - Say N here, unless you are a real PA-RISC Linux kernel hacker. | |
151 | - | |
152 | 141 | config SMP |
153 | 142 | bool "Symmetric multi-processing support" |
154 | 143 | ---help--- |
arch/parisc/mm/ioremap.c
... | ... | @@ -72,7 +72,6 @@ |
72 | 72 | return 0; |
73 | 73 | } |
74 | 74 | |
75 | -#ifdef CONFIG_HPPA_IOREMAP | |
76 | 75 | static int |
77 | 76 | remap_area_pages(unsigned long address, unsigned long phys_addr, |
78 | 77 | unsigned long size, unsigned long flags) |
... | ... | @@ -114,7 +113,6 @@ |
114 | 113 | |
115 | 114 | return error; |
116 | 115 | } |
117 | -#endif /* CONFIG_HPPA_IOREMAP */ | |
118 | 116 | |
119 | 117 | #ifdef CONFIG_DEBUG_IOREMAP |
120 | 118 | static unsigned long last = 0; |
121 | 119 | |
122 | 120 | |
... | ... | @@ -154,21 +152,16 @@ |
154 | 152 | */ |
155 | 153 | void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) |
156 | 154 | { |
157 | -#if !defined(CONFIG_HPPA_IOREMAP) | |
155 | +#ifdef CONFIG_EISA | |
156 | + #error FIXME. | |
158 | 157 | unsigned long end = phys_addr + size - 1; |
159 | 158 | /* Support EISA addresses */ |
160 | 159 | if ((phys_addr >= 0x00080000 && end < 0x000fffff) |
161 | 160 | || (phys_addr >= 0x00500000 && end < 0x03bfffff)) { |
162 | 161 | phys_addr |= 0xfc000000; |
163 | 162 | } |
164 | - | |
165 | -#ifdef CONFIG_DEBUG_IOREMAP | |
166 | - return (void __iomem *)(phys_addr - (0x1UL << NYBBLE_SHIFT)); | |
167 | -#else | |
168 | - return (void __iomem *)phys_addr; | |
169 | 163 | #endif |
170 | 164 | |
171 | -#else | |
172 | 165 | void *addr; |
173 | 166 | struct vm_struct *area; |
174 | 167 | unsigned long offset, last_addr; |
175 | 168 | |
176 | 169 | |
... | ... | @@ -216,16 +209,11 @@ |
216 | 209 | } |
217 | 210 | |
218 | 211 | return (void __iomem *) (offset + (char *)addr); |
219 | -#endif | |
220 | 212 | } |
221 | 213 | |
222 | 214 | void iounmap(void __iomem *addr) |
223 | 215 | { |
224 | -#ifdef CONFIG_HPPA_IOREMAP | |
225 | 216 | if (addr > high_memory) |
226 | 217 | return vfree((void *) (PAGE_MASK & (unsigned long __force) addr)); |
227 | -#else | |
228 | - return; | |
229 | -#endif | |
230 | 218 | } |
include/asm-parisc/io.h
... | ... | @@ -176,12 +176,7 @@ |
176 | 176 | |
177 | 177 | extern void iounmap(void __iomem *addr); |
178 | 178 | |
179 | -/* | |
180 | - * CONFIG_HPPA_IOREMAP is the magic flag to enable or disable real ioremap() | |
181 | - * functionality. It's currently disabled because it may not work on some | |
182 | - * machines. | |
183 | - */ | |
184 | -#ifdef CONFIG_HPPA_IOREMAP | |
179 | + | |
185 | 180 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) |
186 | 181 | { |
187 | 182 | return (*(volatile unsigned char __force *) (addr)); |
... | ... | @@ -215,57 +210,6 @@ |
215 | 210 | { |
216 | 211 | *(volatile unsigned long long __force *) addr = b; |
217 | 212 | } |
218 | -#else /* !CONFIG_HPPA_IOREMAP */ | |
219 | -static inline unsigned char __raw_readb(const volatile void __iomem *addr) | |
220 | -{ | |
221 | - __raw_check_addr(addr); | |
222 | - | |
223 | - return gsc_readb((unsigned long) addr); | |
224 | -} | |
225 | -static inline unsigned short __raw_readw(const volatile void __iomem *addr) | |
226 | -{ | |
227 | - __raw_check_addr(addr); | |
228 | - | |
229 | - return gsc_readw((unsigned long) addr); | |
230 | -} | |
231 | -static inline unsigned int __raw_readl(const volatile void __iomem *addr) | |
232 | -{ | |
233 | - __raw_check_addr(addr); | |
234 | - | |
235 | - return gsc_readl((unsigned long) addr); | |
236 | -} | |
237 | -static inline unsigned long long __raw_readq(const volatile void __iomem *addr) | |
238 | -{ | |
239 | - __raw_check_addr(addr); | |
240 | - | |
241 | - return gsc_readq((unsigned long) addr); | |
242 | -} | |
243 | - | |
244 | -static inline void __raw_writeb(unsigned char b, volatile void __iomem *addr) | |
245 | -{ | |
246 | - __raw_check_addr(addr); | |
247 | - | |
248 | - gsc_writeb(b, (unsigned long) addr); | |
249 | -} | |
250 | -static inline void __raw_writew(unsigned short b, volatile void __iomem *addr) | |
251 | -{ | |
252 | - __raw_check_addr(addr); | |
253 | - | |
254 | - gsc_writew(b, (unsigned long) addr); | |
255 | -} | |
256 | -static inline void __raw_writel(unsigned int b, volatile void __iomem *addr) | |
257 | -{ | |
258 | - __raw_check_addr(addr); | |
259 | - | |
260 | - gsc_writel(b, (unsigned long) addr); | |
261 | -} | |
262 | -static inline void __raw_writeq(unsigned long long b, volatile void __iomem *addr) | |
263 | -{ | |
264 | - __raw_check_addr(addr); | |
265 | - | |
266 | - gsc_writeq(b, (unsigned long) addr); | |
267 | -} | |
268 | -#endif /* !CONFIG_HPPA_IOREMAP */ | |
269 | 213 | |
270 | 214 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ |
271 | 215 | #define readb(addr) __raw_readb(addr) |