diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2012-04-16 16:17:28 +0300 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-24 07:38:08 -0700 |
commit | 678749c92c46fc8f3d4041f1ca0324a2e6742c69 (patch) | |
tree | 31e2203853e73e95b247896dec4f1ebf8229ceea /arch | |
parent | 515b4816d76e5bd196efae5b5f407a22fc33dc2a (diff) |
ARM: tegra: provide fixed mapping for PCIe host
Provide a fixed mapping for the PCIe host registers. This reduces the pressure
on the VMALLOC area significantly.
bug 969392
Change-Id: I80ea0dd5e81a005f86a26eb47aea00d78e9e0ad2
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/96748
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/io.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-tegra/io.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h index 2b091bf83f39..c6847fb78bab 100644 --- a/arch/arm/mach-tegra/include/mach/io.h +++ b/arch/arm/mach-tegra/include/mach/io.h @@ -82,6 +82,14 @@ #define IO_PPCS_VIRT 0xFE100000 #define IO_PPCS_SIZE SZ_1M +#ifdef CONFIG_ARCH_TEGRA_2x_SOC +#define IO_PCIE_PHYS 0x80000000 +#else +#define IO_PCIE_PHYS 0x00000000 +#endif +#define IO_PCIE_VIRT 0xFB000000 +#define IO_PCIE_SIZE (SZ_16M * 3) + #define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) #define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst))) @@ -102,6 +110,8 @@ IO_TO_VIRT_XLATE((n), IO_SDMMC_PHYS, IO_SDMMC_VIRT) : \ IO_TO_VIRT_BETWEEN((n), IO_PPCS_PHYS, IO_PPCS_SIZE) ? \ IO_TO_VIRT_XLATE((n), IO_PPCS_PHYS, IO_PPCS_VIRT) : \ + IO_TO_VIRT_BETWEEN((n), IO_PCIE_PHYS, IO_PCIE_SIZE) ? \ + IO_TO_VIRT_XLATE((n), IO_PCIE_PHYS, IO_PCIE_VIRT) : \ 0) #ifndef __ASSEMBLER__ diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c index 47279e1d5eb8..bcd10843a99d 100644 --- a/arch/arm/mach-tegra/io.c +++ b/arch/arm/mach-tegra/io.c @@ -80,6 +80,12 @@ static struct map_desc tegra_io_desc[] __initdata = { .pfn = __phys_to_pfn(IO_PPCS_PHYS), .length = IO_PPCS_SIZE, .type = MT_DEVICE, + }, + { + .virtual = IO_PCIE_VIRT, + .pfn = __phys_to_pfn(IO_PCIE_PHYS), + .length = IO_PCIE_SIZE, + .type = MT_DEVICE, } }; |