|
@@ -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.
|
|
@@ -64,6 +64,12 @@ void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size,
|
|
|
phys_addr &= PAGE_MASK;
|
|
|
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..
|
|
|
*/
|