diff options
| -rw-r--r-- | arch/arm/mach-omap1/io.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/io.c | 1 | ||||
| -rw-r--r-- | arch/arm/plat-omap/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/plat-omap/common.c | 7 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/io.h | 8 | ||||
| -rw-r--r-- | arch/arm/plat-omap/io.c | 159 |
6 files changed, 8 insertions, 170 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 7969cfda4454..8e55b6fb3478 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
| @@ -121,7 +121,6 @@ void __init omap16xx_map_io(void) | |||
| 121 | void omap1_init_early(void) | 121 | void omap1_init_early(void) |
| 122 | { | 122 | { |
| 123 | omap_check_revision(); | 123 | omap_check_revision(); |
| 124 | omap_ioremap_init(); | ||
| 125 | 124 | ||
| 126 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort | 125 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort |
| 127 | * on a Posted Write in the TIPB Bridge". | 126 | * on a Posted Write in the TIPB Bridge". |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 25d20ced03e1..58ba784dc963 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
| @@ -322,7 +322,6 @@ void __iomem *omap_irq_base; | |||
| 322 | static void __init omap_common_init_early(void) | 322 | static void __init omap_common_init_early(void) |
| 323 | { | 323 | { |
| 324 | omap2_check_revision(); | 324 | omap2_check_revision(); |
| 325 | omap_ioremap_init(); | ||
| 326 | omap_init_consistent_dma_size(); | 325 | omap_init_consistent_dma_size(); |
| 327 | } | 326 | } |
| 328 | 327 | ||
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 985262242f25..3df04d944e4d 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | # Common support | 5 | # Common support |
| 6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ | 6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ |
| 7 | usb.o fb.o io.o counter_32k.o | 7 | usb.o fb.o counter_32k.o |
| 8 | obj-m := | 8 | obj-m := |
| 9 | obj-n := | 9 | obj-n := |
| 10 | obj- := | 10 | obj- := |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index d9f10a31e604..7a4578be9ebe 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
| @@ -66,3 +66,10 @@ void __init omap_reserve(void) | |||
| 66 | omap_vram_reserve_sdram_memblock(); | 66 | omap_vram_reserve_sdram_memblock(); |
| 67 | omap_dsp_reserve_sdram_memblock(); | 67 | omap_dsp_reserve_sdram_memblock(); |
| 68 | } | 68 | } |
| 69 | |||
| 70 | void __init omap_init_consistent_dma_size(void) | ||
| 71 | { | ||
| 72 | #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE | ||
| 73 | init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); | ||
| 74 | #endif | ||
| 75 | } | ||
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index 7f2969eadb85..27d3897f2bbb 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
| @@ -247,8 +247,6 @@ | |||
| 247 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | 247 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
| 248 | */ | 248 | */ |
| 249 | 249 | ||
| 250 | void omap_ioremap_init(void); | ||
| 251 | |||
| 252 | extern u8 omap_readb(u32 pa); | 250 | extern u8 omap_readb(u32 pa); |
| 253 | extern u16 omap_readw(u32 pa); | 251 | extern u16 omap_readw(u32 pa); |
| 254 | extern u32 omap_readl(u32 pa); | 252 | extern u32 omap_readl(u32 pa); |
| @@ -328,12 +326,6 @@ extern void omap2_init_common_infrastructure(void); | |||
| 328 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 326 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
| 329 | struct omap_sdrc_params *sdrc_cs1); | 327 | struct omap_sdrc_params *sdrc_cs1); |
| 330 | 328 | ||
| 331 | #define __arch_ioremap omap_ioremap | ||
| 332 | #define __arch_iounmap omap_iounmap | ||
| 333 | |||
| 334 | void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type); | ||
| 335 | void omap_iounmap(volatile void __iomem *addr); | ||
| 336 | |||
| 337 | extern void __init omap_init_consistent_dma_size(void); | 329 | extern void __init omap_init_consistent_dma_size(void); |
| 338 | 330 | ||
| 339 | #endif | 331 | #endif |
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c deleted file mode 100644 index 333871f59995..000000000000 --- a/arch/arm/plat-omap/io.c +++ /dev/null | |||
| @@ -1,159 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Common io.c file | ||
| 3 | * This file is created by Russell King <rmk+kernel@arm.linux.org.uk> | ||
| 4 | * | ||
| 5 | * Copyright (C) 2009 Texas Instruments | ||
| 6 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | #include <linux/module.h> | ||
| 13 | #include <linux/io.h> | ||
| 14 | #include <linux/mm.h> | ||
| 15 | #include <linux/dma-mapping.h> | ||
| 16 | |||
| 17 | #include <plat/omap7xx.h> | ||
| 18 | #include <plat/omap1510.h> | ||
| 19 | #include <plat/omap16xx.h> | ||
| 20 | #include <plat/omap24xx.h> | ||
| 21 | #include <plat/omap34xx.h> | ||
| 22 | #include <plat/omap44xx.h> | ||
| 23 | |||
| 24 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) | ||
| 25 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) | ||
| 26 | |||
| 27 | static int initialized; | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Intercept ioremap() requests for addresses in our fixed mapping regions. | ||
| 31 | */ | ||
| 32 | void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | ||
| 33 | { | ||
| 34 | |||
| 35 | WARN(!initialized, "Do not use ioremap before init_early\n"); | ||
| 36 | |||
| 37 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 38 | if (cpu_class_is_omap1()) { | ||
| 39 | if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) | ||
| 40 | return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT); | ||
| 41 | } | ||
| 42 | if (cpu_is_omap7xx()) { | ||
| 43 | if (BETWEEN(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_SIZE)) | ||
| 44 | return XLATE(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_START); | ||
| 45 | |||
| 46 | if (BETWEEN(p, OMAP7XX_DSPREG_BASE, OMAP7XX_DSPREG_SIZE)) | ||
| 47 | return XLATE(p, OMAP7XX_DSPREG_BASE, | ||
| 48 | OMAP7XX_DSPREG_START); | ||
| 49 | } | ||
| 50 | if (cpu_is_omap15xx()) { | ||
| 51 | if (BETWEEN(p, OMAP1510_DSP_BASE, OMAP1510_DSP_SIZE)) | ||
| 52 | return XLATE(p, OMAP1510_DSP_BASE, OMAP1510_DSP_START); | ||
| 53 | |||
| 54 | if (BETWEEN(p, OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_SIZE)) | ||
| 55 | return XLATE(p, OMAP1510_DSPREG_BASE, | ||
| 56 | OMAP1510_DSPREG_START); | ||
| 57 | } | ||
| 58 | if (cpu_is_omap16xx()) { | ||
| 59 | if (BETWEEN(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_SIZE)) | ||
| 60 | return XLATE(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_START); | ||
| 61 | |||
| 62 | if (BETWEEN(p, OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_SIZE)) | ||
| 63 | return XLATE(p, OMAP16XX_DSPREG_BASE, | ||
| 64 | OMAP16XX_DSPREG_START); | ||
| 65 | } | ||
| 66 | #endif | ||
| 67 | #ifdef CONFIG_ARCH_OMAP2 | ||
| 68 | if (cpu_is_omap24xx()) { | ||
| 69 | if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE)) | ||
| 70 | return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT); | ||
| 71 | if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE)) | ||
| 72 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); | ||
| 73 | } | ||
| 74 | if (cpu_is_omap2420()) { | ||
| 75 | if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE)) | ||
| 76 | return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT); | ||
| 77 | if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE)) | ||
| 78 | return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE); | ||
| 79 | if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE)) | ||
| 80 | return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT); | ||
| 81 | } | ||
| 82 | if (cpu_is_omap2430()) { | ||
| 83 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) | ||
| 84 | return XLATE(p, L4_WK_243X_PHYS, L4_WK_243X_VIRT); | ||
| 85 | if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE)) | ||
| 86 | return XLATE(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT); | ||
| 87 | if (BETWEEN(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_SIZE)) | ||
| 88 | return XLATE(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_VIRT); | ||
| 89 | if (BETWEEN(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_SIZE)) | ||
| 90 | return XLATE(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_VIRT); | ||
| 91 | } | ||
| 92 | #endif | ||
| 93 | #ifdef CONFIG_ARCH_OMAP3 | ||
| 94 | if (cpu_is_ti816x()) { | ||
| 95 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
| 96 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
| 97 | } else if (cpu_is_omap34xx()) { | ||
| 98 | if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) | ||
| 99 | return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); | ||
| 100 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
| 101 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
| 102 | if (BETWEEN(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_SIZE)) | ||
| 103 | return XLATE(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_VIRT); | ||
| 104 | if (BETWEEN(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_SIZE)) | ||
| 105 | return XLATE(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_VIRT); | ||
| 106 | if (BETWEEN(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_SIZE)) | ||
| 107 | return XLATE(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_VIRT); | ||
| 108 | if (BETWEEN(p, L4_PER_34XX_PHYS, L4_PER_34XX_SIZE)) | ||
| 109 | return XLATE(p, L4_PER_34XX_PHYS, L4_PER_34XX_VIRT); | ||
| 110 | if (BETWEEN(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_SIZE)) | ||
| 111 | return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | #ifdef CONFIG_ARCH_OMAP4 | ||
| 115 | if (cpu_is_omap44xx()) { | ||
| 116 | if (BETWEEN(p, L3_44XX_PHYS, L3_44XX_SIZE)) | ||
| 117 | return XLATE(p, L3_44XX_PHYS, L3_44XX_VIRT); | ||
| 118 | if (BETWEEN(p, L4_44XX_PHYS, L4_44XX_SIZE)) | ||
| 119 | return XLATE(p, L4_44XX_PHYS, L4_44XX_VIRT); | ||
| 120 | if (BETWEEN(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_SIZE)) | ||
| 121 | return XLATE(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_VIRT); | ||
| 122 | if (BETWEEN(p, OMAP44XX_EMIF1_PHYS, OMAP44XX_EMIF1_SIZE)) | ||
| 123 | return XLATE(p, OMAP44XX_EMIF1_PHYS, \ | ||
| 124 | OMAP44XX_EMIF1_VIRT); | ||
| 125 | if (BETWEEN(p, OMAP44XX_EMIF2_PHYS, OMAP44XX_EMIF2_SIZE)) | ||
| 126 | return XLATE(p, OMAP44XX_EMIF2_PHYS, \ | ||
| 127 | OMAP44XX_EMIF2_VIRT); | ||
| 128 | if (BETWEEN(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_SIZE)) | ||
| 129 | return XLATE(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_VIRT); | ||
| 130 | if (BETWEEN(p, L4_PER_44XX_PHYS, L4_PER_44XX_SIZE)) | ||
| 131 | return XLATE(p, L4_PER_44XX_PHYS, L4_PER_44XX_VIRT); | ||
| 132 | if (BETWEEN(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_SIZE)) | ||
| 133 | return XLATE(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_VIRT); | ||
| 134 | } | ||
| 135 | #endif | ||
| 136 | return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); | ||
| 137 | } | ||
| 138 | EXPORT_SYMBOL(omap_ioremap); | ||
| 139 | |||
| 140 | void omap_iounmap(volatile void __iomem *addr) | ||
| 141 | { | ||
| 142 | unsigned long virt = (unsigned long)addr; | ||
| 143 | |||
| 144 | if (virt >= VMALLOC_START && virt < VMALLOC_END) | ||
| 145 | __iounmap(addr); | ||
| 146 | } | ||
| 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 | } | ||
