diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 15:57:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 15:57:31 -0400 |
commit | a2ab67fae1ab9226679495a8d260f4e6555efc5f (patch) | |
tree | f7de683c9c8ff0869a7e11f1d40802145d05f5b4 /arch/arm/mach-davinci/io.c | |
parent | 6d0485a99366d4e0e7e725f14995c74cb7ca4499 (diff) | |
parent | 135cad366b4e7d6a79f6369f6cb5b721985aa62f (diff) |
Merge branch 'for-rmk-devel' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:
arch/arm/Kconfig
arch/arm/Makefile
Diffstat (limited to 'arch/arm/mach-davinci/io.c')
-rw-r--r-- | arch/arm/mach-davinci/io.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c index 299515f70b8b..a548abb513e2 100644 --- a/arch/arm/mach-davinci/io.c +++ b/arch/arm/mach-davinci/io.c | |||
@@ -51,7 +51,26 @@ void __init davinci_map_common_io(void) | |||
51 | davinci_check_revision(); | 51 | davinci_check_revision(); |
52 | } | 52 | } |
53 | 53 | ||
54 | void __init davinci_init_common_hw(void) | 54 | #define BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) |
55 | #define XLATE(p, pst, vst) ((void __iomem *)((p) - (pst) + (vst))) | ||
56 | |||
57 | /* | ||
58 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | ||
59 | */ | ||
60 | void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type) | ||
61 | { | ||
62 | if (BETWEEN(p, IO_PHYS, IO_SIZE)) | ||
63 | return XLATE(p, IO_PHYS, IO_VIRT); | ||
64 | |||
65 | return __arm_ioremap(p, size, type); | ||
66 | } | ||
67 | EXPORT_SYMBOL(davinci_ioremap); | ||
68 | |||
69 | void davinci_iounmap(volatile void __iomem *addr) | ||
55 | { | 70 | { |
56 | davinci_clk_init(); | 71 | unsigned long virt = (unsigned long)addr; |
72 | |||
73 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
74 | __iounmap(addr); | ||
57 | } | 75 | } |
76 | EXPORT_SYMBOL(davinci_iounmap); | ||