aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/ioremap_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/ioremap_32.c')
-rw-r--r--arch/sh/mm/ioremap_32.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c
index 60cc486d2c2c..da2f4186f2cd 100644
--- a/arch/sh/mm/ioremap_32.c
+++ b/arch/sh/mm/ioremap_32.c
@@ -46,17 +46,15 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
46 return NULL; 46 return NULL;
47 47
48 /* 48 /*
49 * If we're on an SH7751 or SH7780 PCI controller, PCI memory is 49 * If we're in the fixed PCI memory range, mapping through page
50 * mapped at the end of the address space (typically 0xfd000000) 50 * tables is not only pointless, but also fundamentally broken.
51 * in a non-translatable area, so mapping through page tables for 51 * Just return the physical address instead.
52 * this area is not only pointless, but also fundamentally
53 * broken. Just return the physical address instead.
54 * 52 *
55 * For boards that map a small PCI memory aperture somewhere in 53 * For boards that map a small PCI memory aperture somewhere in
56 * P1/P2 space, ioremap() will already do the right thing, 54 * P1/P2 space, ioremap() will already do the right thing,
57 * and we'll never get this far. 55 * and we'll never get this far.
58 */ 56 */
59 if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr)) 57 if (is_pci_memory_fixed_range(phys_addr, size))
60 return (void __iomem *)phys_addr; 58 return (void __iomem *)phys_addr;
61 59
62#if !defined(CONFIG_PMB_FIXED) 60#if !defined(CONFIG_PMB_FIXED)
@@ -121,7 +119,9 @@ void __iounmap(void __iomem *addr)
121 unsigned long seg = PXSEG(vaddr); 119 unsigned long seg = PXSEG(vaddr);
122 struct vm_struct *p; 120 struct vm_struct *p;
123 121
124 if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr)) 122 if (seg < P3SEG || vaddr >= P3_ADDR_MAX)
123 return;
124 if (is_pci_memory_fixed_range(vaddr, 0))
125 return; 125 return;
126 126
127#ifdef CONFIG_PMB 127#ifdef CONFIG_PMB