diff options
Diffstat (limited to 'arch/sh/mm/ioremap_fixed.c')
-rw-r--r-- | arch/sh/mm/ioremap_fixed.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/mm/ioremap_fixed.c b/arch/sh/mm/ioremap_fixed.c index 0b78b1e20ef1..7f682e5dafcf 100644 --- a/arch/sh/mm/ioremap_fixed.c +++ b/arch/sh/mm/ioremap_fixed.c | |||
@@ -45,14 +45,21 @@ void __init ioremap_fixed_init(void) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | void __init __iomem * | 47 | void __init __iomem * |
48 | ioremap_fixed(resource_size_t phys_addr, unsigned long offset, | 48 | ioremap_fixed(phys_addr_t phys_addr, unsigned long size, pgprot_t prot) |
49 | unsigned long size, pgprot_t prot) | ||
50 | { | 49 | { |
51 | enum fixed_addresses idx0, idx; | 50 | enum fixed_addresses idx0, idx; |
52 | struct ioremap_map *map; | 51 | struct ioremap_map *map; |
53 | unsigned int nrpages; | 52 | unsigned int nrpages; |
53 | unsigned long offset; | ||
54 | int i, slot; | 54 | int i, slot; |
55 | 55 | ||
56 | /* | ||
57 | * Mappings have to be page-aligned | ||
58 | */ | ||
59 | offset = phys_addr & ~PAGE_MASK; | ||
60 | phys_addr &= PAGE_MASK; | ||
61 | size = PAGE_ALIGN(phys_addr + size) - phys_addr; | ||
62 | |||
56 | slot = -1; | 63 | slot = -1; |
57 | for (i = 0; i < FIX_N_IOREMAPS; i++) { | 64 | for (i = 0; i < FIX_N_IOREMAPS; i++) { |
58 | map = &ioremap_maps[i]; | 65 | map = &ioremap_maps[i]; |