aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-04-29 23:56:37 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-29 23:56:37 -0400
commite6be3a25861429166f945499c7ee616875bc3db9 (patch)
treeb6eb123d55974846ce83665e786877a69bdeffef /arch/sh/include
parent4278600644dee621bd50d7498e244b135612e0f6 (diff)
sh: pass through ioremap() for non-mmu processors.
All 32-bit SuperH processors currently go through __ioremap_mode() and check for IO_TRAPPED and directly mapped segments. With this patch we simplify the MMU less case with a pass through version of __ioremap_mode() which just returns the physical address. The effects of this is change are: - fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT) - make sure IO_TRAPPED is not selected Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/io.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 0454f8d68059..ef217344afcb 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -228,12 +228,6 @@ void __iounmap(void __iomem *addr);
228unsigned long onchip_remap(unsigned long addr, unsigned long size, 228unsigned long onchip_remap(unsigned long addr, unsigned long size,
229 const char *name); 229 const char *name);
230extern void onchip_unmap(unsigned long vaddr); 230extern void onchip_unmap(unsigned long vaddr);
231#else
232#define __ioremap(offset, size, flags) ((void __iomem *)(offset))
233#define __iounmap(addr) do { } while (0)
234#define onchip_remap(addr, size, name) (addr)
235#define onchip_unmap(addr) do { } while (0)
236#endif /* CONFIG_MMU */
237 231
238static inline void __iomem * 232static inline void __iomem *
239__ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) 233__ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
@@ -268,6 +262,12 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
268 262
269 return __ioremap(offset, size, flags); 263 return __ioremap(offset, size, flags);
270} 264}
265#else
266#define onchip_remap(addr, size, name) (addr)
267#define onchip_unmap(addr) do { } while (0)
268#define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset))
269#define __iounmap(addr) do { } while (0)
270#endif /* CONFIG_MMU */
271 271
272#define ioremap(offset, size) \ 272#define ioremap(offset, size) \
273 __ioremap_mode((offset), (size), 0) 273 __ioremap_mode((offset), (size), 0)