From b04ab5d338b31b21af0db5983839368a6ec4f327 Mon Sep 17 00:00:00 2001 From: vdumpa Date: Mon, 6 Jun 2011 10:57:54 -0700 Subject: ARM: tegra: Update tegra_ioremap for PCIE. Update tegra_ioremap for PCIE address mapping. Bug 637871 Change-Id: I9999f58ae6ceb5609d8f7c5783f5a8ffac90b582 Reviewed-on: http://git-master/r/35253 Reviewed-by: Scott Williams Reviewed-by: Dan Willemsen Reviewed-by: Jeremy Alves Tested-by: Krishna Thota Reviewed-by: Narendra Damahe --- arch/arm/mach-tegra/io.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c index a0c48b583530..0018321aed8a 100644 --- a/arch/arm/mach-tegra/io.c +++ b/arch/arm/mach-tegra/io.c @@ -94,9 +94,13 @@ 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. */ - if (v == NULL && p >= TEGRA_DRAM_BASE && - p <= (TEGRA_DRAM_BASE + TEGRA_DRAM_SIZE)) + if (v == NULL) { + if ((p >= TEGRA_DRAM_BASE && + (p + size) <= (TEGRA_DRAM_BASE + TEGRA_DRAM_SIZE)) || + (p >= TEGRA_PCIE_BASE && + (p + size) <= (TEGRA_PCIE_BASE + TEGRA_PCIE_SIZE))) v = __arm_ioremap(p, size, type); + } /* * If the physical address was not physical memory or statically -- cgit v1.2.3