Signed-off-by: Mike Rapoport <[email protected]>
---
arch/arm/mach-tegra/io.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index a1674da..b5a083f 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -80,6 +80,19 @@ void __init tegra_map_common_io(void)
iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
}
+static bool is_ioremap_safe(unsigned long p)
+{
+ if (p < SZ_1G)
+ return true;
+
+#ifdef CONFIG_PCI
+ if (p >= 0x80000000 && p < 0xc0000000)
+ return true;
+#endif
+
+ return false;
+}
+
/*
* Intercept ioremap() requests for addresses in our fixed mapping regions.
*/
@@ -89,9 +102,9 @@ void __iomem *tegra_ioremap(unsigned long p, size_t size,
unsigned int type)
/*
* __arm_ioremap fails to set the domain of ioremapped memory
- * correctly, only use it on physical memory.
+ * correctly, only use it on physical memory or PCI space.
*/
- if (v == NULL && p < SZ_1G)
+ if (v == NULL && is_ioremap_safe(p))
v = __arm_ioremap(p, size, type);
/*
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html