diff options
Diffstat (limited to 'arch/arm/plat-omap/io.c')
| -rw-r--r-- | arch/arm/plat-omap/io.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index f1ecfa9fc61d..333871f59995 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
| 14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 15 | #include <linux/dma-mapping.h> | ||
| 15 | 16 | ||
| 16 | #include <plat/omap7xx.h> | 17 | #include <plat/omap7xx.h> |
| 17 | #include <plat/omap1510.h> | 18 | #include <plat/omap1510.h> |
| @@ -23,11 +24,16 @@ | |||
| 23 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) | 24 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) |
| 24 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) | 25 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) |
| 25 | 26 | ||
| 27 | static int initialized; | ||
| 28 | |||
| 26 | /* | 29 | /* |
| 27 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | 30 | * Intercept ioremap() requests for addresses in our fixed mapping regions. |
| 28 | */ | 31 | */ |
| 29 | void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | 32 | void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) |
| 30 | { | 33 | { |
| 34 | |||
| 35 | WARN(!initialized, "Do not use ioremap before init_early\n"); | ||
| 36 | |||
| 31 | #ifdef CONFIG_ARCH_OMAP1 | 37 | #ifdef CONFIG_ARCH_OMAP1 |
| 32 | if (cpu_class_is_omap1()) { | 38 | if (cpu_class_is_omap1()) { |
| 33 | if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) | 39 | if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) |
| @@ -139,3 +145,15 @@ void omap_iounmap(volatile void __iomem *addr) | |||
| 139 | __iounmap(addr); | 145 | __iounmap(addr); |
| 140 | } | 146 | } |
| 141 | EXPORT_SYMBOL(omap_iounmap); | 147 | EXPORT_SYMBOL(omap_iounmap); |
| 148 | |||
| 149 | void __init omap_init_consistent_dma_size(void) | ||
| 150 | { | ||
| 151 | #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE | ||
| 152 | init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); | ||
| 153 | #endif | ||
| 154 | } | ||
| 155 | |||
| 156 | void __init omap_ioremap_init(void) | ||
| 157 | { | ||
| 158 | initialized++; | ||
| 159 | } | ||
