summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/io.c
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2011-01-28 13:39:17 +0530
committerNitin Kumbhar <nkumbhar@nvidia.com>2011-01-28 13:39:17 +0530
commit8197cb15eaf0640d13c816926f65972ca6cbba84 (patch)
tree17b034f1f03a3d1b7776001cb63bdfd186415130 /arch/arm/mach-tegra/io.c
parent7cc7de288765bc634a0374e660de01a3fd4e8e39 (diff)
parent22b3c9ca22924cf7015ecadf7ce111cf402a707b (diff)
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Conflicts: arch/arm/mach-tegra/tegra2_dvfs.c Change-Id: I3853d668107c191c94f731256a8d0b63149e8279
Diffstat (limited to 'arch/arm/mach-tegra/io.c')
-rw-r--r--arch/arm/mach-tegra/io.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index 31848a9592f8..a1674da7dd81 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -55,6 +55,24 @@ static struct map_desc tegra_io_desc[] __initdata = {
.length = IO_IRAM_SIZE,
.type = MT_DEVICE,
},
+ {
+ .virtual = IO_HOST1X_VIRT,
+ .pfn = __phys_to_pfn(IO_HOST1X_PHYS),
+ .length = IO_HOST1X_SIZE,
+ .type = MT_DEVICE,
+ },
+ {
+ .virtual = IO_USB_VIRT,
+ .pfn = __phys_to_pfn(IO_USB_PHYS),
+ .length = IO_USB_SIZE,
+ .type = MT_DEVICE,
+ },
+ {
+ .virtual = IO_SDMMC_VIRT,
+ .pfn = __phys_to_pfn(IO_SDMMC_PHYS),
+ .length = IO_SDMMC_SIZE,
+ .type = MT_DEVICE,
+ },
};
void __init tegra_map_common_io(void)
@@ -68,8 +86,20 @@ void __init tegra_map_common_io(void)
void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type)
{
void __iomem *v = IO_ADDRESS(p);
- if (v == NULL)
+
+ /*
+ * __arm_ioremap fails to set the domain of ioremapped memory
+ * correctly, only use it on physical memory.
+ */
+ if (v == NULL && p < SZ_1G)
v = __arm_ioremap(p, size, type);
+
+ /*
+ * If the physical address was not physical memory or statically
+ * mapped, there's nothing we can do to map it safely.
+ */
+ BUG_ON(v == NULL);
+
return v;
}
EXPORT_SYMBOL(tegra_ioremap);