aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/io.c')
-rw-r--r--arch/arm/plat-omap/io.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index f1ecfa9fc61d..1bbcbde76400 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -23,11 +23,16 @@
23#define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) 23#define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz)))
24#define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) 24#define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst)))
25 25
26static int initialized;
27
26/* 28/*
27 * Intercept ioremap() requests for addresses in our fixed mapping regions. 29 * Intercept ioremap() requests for addresses in our fixed mapping regions.
28 */ 30 */
29void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) 31void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
30{ 32{
33
34 WARN(!initialized, "Do not use ioremap before init_early\n");
35
31#ifdef CONFIG_ARCH_OMAP1 36#ifdef CONFIG_ARCH_OMAP1
32 if (cpu_class_is_omap1()) { 37 if (cpu_class_is_omap1()) {
33 if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) 38 if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
@@ -139,3 +144,8 @@ void omap_iounmap(volatile void __iomem *addr)
139 __iounmap(addr); 144 __iounmap(addr);
140} 145}
141EXPORT_SYMBOL(omap_iounmap); 146EXPORT_SYMBOL(omap_iounmap);
147
148void __init omap_ioremap_init(void)
149{
150 initialized++;
151}