diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/ioremap.c | 20 | ||||
-rw-r--r-- | arch/arm/mm/nommu.c | 12 |
2 files changed, 15 insertions, 17 deletions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 216623eece35..d6167ad4e011 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -262,11 +262,10 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, | |||
262 | * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. | 262 | * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. |
263 | */ | 263 | */ |
264 | void __iomem * | 264 | void __iomem * |
265 | __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | 265 | __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, |
266 | unsigned long flags) | 266 | unsigned int mtype) |
267 | { | 267 | { |
268 | const struct mem_type *type; | 268 | const struct mem_type *type; |
269 | struct mem_type t; | ||
270 | int err; | 269 | int err; |
271 | unsigned long addr; | 270 | unsigned long addr; |
272 | struct vm_struct * area; | 271 | struct vm_struct * area; |
@@ -277,10 +276,9 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | |||
277 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) | 276 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) |
278 | return NULL; | 277 | return NULL; |
279 | 278 | ||
280 | t = *get_mem_type(MT_DEVICE); | 279 | type = get_mem_type(mtype); |
281 | t.prot_sect |= flags; | 280 | if (!type) |
282 | t.prot_pte |= flags; | 281 | return NULL; |
283 | type = &t; | ||
284 | 282 | ||
285 | size = PAGE_ALIGN(size); | 283 | size = PAGE_ALIGN(size); |
286 | 284 | ||
@@ -311,10 +309,10 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | |||
311 | flush_cache_vmap(addr, addr + size); | 309 | flush_cache_vmap(addr, addr + size); |
312 | return (void __iomem *) (offset + addr); | 310 | return (void __iomem *) (offset + addr); |
313 | } | 311 | } |
314 | EXPORT_SYMBOL(__ioremap_pfn); | 312 | EXPORT_SYMBOL(__arm_ioremap_pfn); |
315 | 313 | ||
316 | void __iomem * | 314 | void __iomem * |
317 | __ioremap(unsigned long phys_addr, size_t size, unsigned long flags) | 315 | __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) |
318 | { | 316 | { |
319 | unsigned long last_addr; | 317 | unsigned long last_addr; |
320 | unsigned long offset = phys_addr & ~PAGE_MASK; | 318 | unsigned long offset = phys_addr & ~PAGE_MASK; |
@@ -332,9 +330,9 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags) | |||
332 | */ | 330 | */ |
333 | size = PAGE_ALIGN(last_addr + 1) - phys_addr; | 331 | size = PAGE_ALIGN(last_addr + 1) - phys_addr; |
334 | 332 | ||
335 | return __ioremap_pfn(pfn, offset, size, flags); | 333 | return __arm_ioremap_pfn(pfn, offset, size, mtype); |
336 | } | 334 | } |
337 | EXPORT_SYMBOL(__ioremap); | 335 | EXPORT_SYMBOL(__arm_ioremap); |
338 | 336 | ||
339 | void __iounmap(volatile void __iomem *addr) | 337 | void __iounmap(volatile void __iomem *addr) |
340 | { | 338 | { |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 05818fc0c705..8cd3a60954f0 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -62,21 +62,21 @@ void flush_dcache_page(struct page *page) | |||
62 | } | 62 | } |
63 | EXPORT_SYMBOL(flush_dcache_page); | 63 | EXPORT_SYMBOL(flush_dcache_page); |
64 | 64 | ||
65 | void __iomem *__ioremap_pfn(unsigned long pfn, unsigned long offset, | 65 | void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset, |
66 | size_t size, unsigned long flags) | 66 | size_t size, unsigned int mtype) |
67 | { | 67 | { |
68 | if (pfn >= (0x100000000ULL >> PAGE_SHIFT)) | 68 | if (pfn >= (0x100000000ULL >> PAGE_SHIFT)) |
69 | return NULL; | 69 | return NULL; |
70 | return (void __iomem *) (offset + (pfn << PAGE_SHIFT)); | 70 | return (void __iomem *) (offset + (pfn << PAGE_SHIFT)); |
71 | } | 71 | } |
72 | EXPORT_SYMBOL(__ioremap_pfn); | 72 | EXPORT_SYMBOL(__arm_ioremap_pfn); |
73 | 73 | ||
74 | void __iomem *__ioremap(unsigned long phys_addr, size_t size, | 74 | void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size, |
75 | unsigned long flags) | 75 | unsigned int mtype) |
76 | { | 76 | { |
77 | return (void __iomem *)phys_addr; | 77 | return (void __iomem *)phys_addr; |
78 | } | 78 | } |
79 | EXPORT_SYMBOL(__ioremap); | 79 | EXPORT_SYMBOL(__arm_ioremap); |
80 | 80 | ||
81 | void __iounmap(volatile void __iomem *addr) | 81 | void __iounmap(volatile void __iomem *addr) |
82 | { | 82 | { |