diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 15:08:32 +0300 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 15:08:32 +0300 |
commit | d9b9487af79955a8e8fcddc963f56697e020cfed (patch) | |
tree | fc04b367df0bf5c646f87237cd14173ffe868fea /arch/sh/mm/ioremap_32.c | |
parent | 0c54de146ef4303ed3c5879b043894c8db637507 (diff) | |
download | linux-d9b9487af79955a8e8fcddc963f56697e020cfed.tar.xz |
sh: Handle early ioremaps through fixed mappings.
This adds in a mem_init_done to work out when a standard ioremap() is
possible, falling back to the fixmap based ioremap otherwise.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/ioremap_32.c')
-rw-r--r-- | arch/sh/mm/ioremap_32.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c index c80a8166fbb0..24f6ba6bff71 100644 --- a/arch/sh/mm/ioremap_32.c +++ b/arch/sh/mm/ioremap_32.c @@ -1,13 +1,13 @@ /* * arch/sh/mm/ioremap.c * + * (C) Copyright 1995 1996 Linus Torvalds + * (C) Copyright 2005 - 2010 Paul Mundt + * * Re-map IO memory to kernel address space so that we can access it. * This is needed for high PCI addresses that aren't mapped in the * 640k-1MB IO memory area on PC's * - * (C) Copyright 1995 1996 Linus Torvalds - * (C) Copyright 2005, 2006 Paul Mundt - * * This file is subject to the terms and conditions of the GNU General * Public License. See the file "COPYING" in the main directory of this * archive for more details. @@ -65,6 +65,12 @@ void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size, size = PAGE_ALIGN(last_addr+1) - phys_addr; /* + * If we can't yet use the regular approach, go the fixmap route. + */ + if (!mem_init_done) + return ioremap_fixed(phys_addr, size, __pgprot(flags)); + + /* * Ok, go for it.. */ area = get_vm_area_caller(size, VM_IOREMAP, caller); |