diff options
author | Helge Deller <deller@parisc-linux.org> | 2006-03-23 02:32:46 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-03-30 12:48:48 -0500 |
commit | 29ef8295327653ff09a56285c35213cd31fa54b3 (patch) | |
tree | f438a0a36fcde67c3ea6db45b1400c29eb9366be | |
parent | 857600c77161fd36e30cd6bcca9a0a8676036323 (diff) |
[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>
-rw-r--r-- | arch/parisc/Kconfig | 11 | ||||
-rw-r--r-- | arch/parisc/mm/ioremap.c | 16 | ||||
-rw-r--r-- | include/asm-parisc/io.h | 58 |
3 files changed, 3 insertions, 82 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index fc5755d1db57..6b3c50964ca9 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -138,17 +138,6 @@ config 64BIT | |||
138 | enable this option otherwise. The 64bit kernel is significantly bigger | 138 | enable this option otherwise. The 64bit kernel is significantly bigger |
139 | and slower than the 32bit one. | 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 | config SMP | 141 | config SMP |
153 | bool "Symmetric multi-processing support" | 142 | bool "Symmetric multi-processing support" |
154 | ---help--- | 143 | ---help--- |
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 028772144191..5a22e1cab217 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c | |||
@@ -72,7 +72,6 @@ remap_area_pmd(pmd_t *pmd, unsigned long address, unsigned long size, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | #ifdef CONFIG_HPPA_IOREMAP | ||
76 | static int | 75 | static int |
77 | remap_area_pages(unsigned long address, unsigned long phys_addr, | 76 | remap_area_pages(unsigned long address, unsigned long phys_addr, |
78 | unsigned long size, unsigned long flags) | 77 | unsigned long size, unsigned long flags) |
@@ -114,7 +113,6 @@ remap_area_pages(unsigned long address, unsigned long phys_addr, | |||
114 | 113 | ||
115 | return error; | 114 | return error; |
116 | } | 115 | } |
117 | #endif /* CONFIG_HPPA_IOREMAP */ | ||
118 | 116 | ||
119 | #ifdef CONFIG_DEBUG_IOREMAP | 117 | #ifdef CONFIG_DEBUG_IOREMAP |
120 | static unsigned long last = 0; | 118 | static unsigned long last = 0; |
@@ -154,21 +152,16 @@ EXPORT_SYMBOL(__raw_bad_addr); | |||
154 | */ | 152 | */ |
155 | void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) | 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 | unsigned long end = phys_addr + size - 1; | 157 | unsigned long end = phys_addr + size - 1; |
159 | /* Support EISA addresses */ | 158 | /* Support EISA addresses */ |
160 | if ((phys_addr >= 0x00080000 && end < 0x000fffff) | 159 | if ((phys_addr >= 0x00080000 && end < 0x000fffff) |
161 | || (phys_addr >= 0x00500000 && end < 0x03bfffff)) { | 160 | || (phys_addr >= 0x00500000 && end < 0x03bfffff)) { |
162 | phys_addr |= 0xfc000000; | 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 | #endif | 163 | #endif |
170 | 164 | ||
171 | #else | ||
172 | void *addr; | 165 | void *addr; |
173 | struct vm_struct *area; | 166 | struct vm_struct *area; |
174 | unsigned long offset, last_addr; | 167 | unsigned long offset, last_addr; |
@@ -216,15 +209,10 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
216 | } | 209 | } |
217 | 210 | ||
218 | return (void __iomem *) (offset + (char *)addr); | 211 | return (void __iomem *) (offset + (char *)addr); |
219 | #endif | ||
220 | } | 212 | } |
221 | 213 | ||
222 | void iounmap(void __iomem *addr) | 214 | void iounmap(void __iomem *addr) |
223 | { | 215 | { |
224 | #ifdef CONFIG_HPPA_IOREMAP | ||
225 | if (addr > high_memory) | 216 | if (addr > high_memory) |
226 | return vfree((void *) (PAGE_MASK & (unsigned long __force) addr)); | 217 | return vfree((void *) (PAGE_MASK & (unsigned long __force) addr)); |
227 | #else | ||
228 | return; | ||
229 | #endif | ||
230 | } | 218 | } |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 2fb253255102..bcfe0b09c93f 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -176,12 +176,7 @@ extern inline void * ioremap_nocache(unsigned long offset, unsigned long size) | |||
176 | 176 | ||
177 | extern void iounmap(void __iomem *addr); | 177 | extern void iounmap(void __iomem *addr); |
178 | 178 | ||
179 | /* | 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 | ||
185 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) | 180 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) |
186 | { | 181 | { |
187 | return (*(volatile unsigned char __force *) (addr)); | 182 | return (*(volatile unsigned char __force *) (addr)); |
@@ -215,57 +210,6 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add | |||
215 | { | 210 | { |
216 | *(volatile unsigned long long __force *) addr = b; | 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 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ | 214 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ |
271 | #define readb(addr) __raw_readb(addr) | 215 | #define readb(addr) __raw_readb(addr) |