summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/iovmm-smmu.c
diff options
context:
space:
mode:
authorHiro Sugawara <hsugawara@nvidia.com>2011-09-13 17:20:35 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:07 -0800
commit10f14812913c148217b4cd9d026284f367a7c660 (patch)
tree767ddda1a95674481ceeb2b6c5fc8d022c23c94c /arch/arm/mach-tegra/iovmm-smmu.c
parenteae9abf71a28401cdfdcad939e62ae48415b2515 (diff)
arm: tegra: smmu: Remove IORESOURCE use from SMMU IOVA range
SMMU simply needs to know its assigned IOVA range, but does not need address space resources. Bug 874438 Change-Id: I0b9943d06c49363cfc0355586866f3bd6b217274 Reviewed-on: http://git-master/r/54534 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R3f4045ef2858960cd987a7477ec6869168ccec7d
Diffstat (limited to 'arch/arm/mach-tegra/iovmm-smmu.c')
-rw-r--r--arch/arm/mach-tegra/iovmm-smmu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/iovmm-smmu.c b/arch/arm/mach-tegra/iovmm-smmu.c
index ceb9a5ad803e..9107aecf9ad4 100644
--- a/arch/arm/mach-tegra/iovmm-smmu.c
+++ b/arch/arm/mach-tegra/iovmm-smmu.c
@@ -35,9 +35,9 @@
#include <asm/cacheflush.h>
#include <asm/page.h>
#include <asm/cacheflush.h>
-
#include <mach/iovmm.h>
#include <mach/iomap.h>
+#include "tegra_smmu.h"
/* For debugging */
/*#define SMMU_DEBUG*/
@@ -942,7 +942,8 @@ static struct tegra_iovmm_device_ops tegra_iovmm_smmu_ops = {
static int smmu_probe(struct platform_device *pdev)
{
struct smmu_device *smmu = NULL;
- struct resource *regs = NULL, *window = NULL, *regs2 = NULL;
+ struct resource *regs = NULL, *regs2 = NULL;
+ struct tegra_smmu_window *window = NULL;
int e, asid;
if (!pdev) {
@@ -963,7 +964,7 @@ static int smmu_probe(struct platform_device *pdev)
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mc");
regs2 = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ahbarb");
- window = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smmu");
+ window = tegra_smmu_window(0);
if (!regs || !regs2 || !window) {
pr_err(DRIVER_NAME ": No SMMU resources\n");
@@ -979,7 +980,7 @@ static int smmu_probe(struct platform_device *pdev)
smmu->iovmm_base = (tegra_iovmm_addr_t)window->start;
smmu->page_count = (window->end + 1 - window->start) >> SMMU_PAGE_SHIFT;
smmu->regs = ioremap(regs->start, regs->end + 1 - regs->start);
- smmu->regs_ahbarb = ioremap(regs2->start, regs2->end + 1 - regs->start);
+ smmu->regs_ahbarb = ioremap(regs2->start, regs2->end+1 - regs2->start);
if (!smmu->regs || !smmu->regs_ahbarb) {
pr_err(DRIVER_NAME ": failed to remap SMMU registers\n");
e = -ENXIO;