[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200718193457.30046-3-vdumpa@nvidia.com>
Date: Sat, 18 Jul 2020 12:34:54 -0700
From: Krishna Reddy <vdumpa@...dia.com>
To: <joro@...tes.org>, <will@...nel.org>, <robin.murphy@....com>,
<robh+dt@...nel.org>, <treding@...dia.com>, <jonathanh@...dia.com>
CC: <devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <yhsu@...dia.com>,
<snikam@...dia.com>, <praithatha@...dia.com>, <talho@...dia.com>,
<bbiswas@...dia.com>, <mperttunen@...dia.com>,
<nicolinc@...dia.com>, <bhuntsman@...dia.com>,
<nicoleotsuka@...il.com>, Krishna Reddy <vdumpa@...dia.com>,
Thierry Reding <thierry.reding@...il.com>
Subject: [PATCH v11 2/5] iommu/arm-smmu: ioremap smmu mmio region before implementation init
ioremap smmu mmio region before calling into implementation init.
This is necessary to allow mapped address available during vendor
specific implementation init.
Reviewed-by: Jon Hunter <jonathanh@...dia.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@...il.com>
Reviewed-by: Pritesh Raithatha <praithatha@...dia.com>
Reviewed-by: Robin Murphy <robin.murphy@....com>
Reviewed-by: Thierry Reding <thierry.reding@...il.com>
Signed-off-by: Krishna Reddy <vdumpa@...dia.com>
---
drivers/iommu/arm-smmu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index cdd15ead9bc4..de520115d3df 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -2123,10 +2123,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
if (err)
return err;
- smmu = arm_smmu_impl_init(smmu);
- if (IS_ERR(smmu))
- return PTR_ERR(smmu);
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ioaddr = res->start;
smmu->base = devm_ioremap_resource(dev, res);
@@ -2138,6 +2134,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
*/
smmu->numpage = resource_size(res);
+ smmu = arm_smmu_impl_init(smmu);
+ if (IS_ERR(smmu))
+ return PTR_ERR(smmu);
+
num_irqs = 0;
while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, num_irqs))) {
num_irqs++;
--
2.26.2
Powered by blists - more mailing lists