Skip to content

Commit 6c019f4

Browse files
krishnareddy-dvwilldeacon
authored andcommitted
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. Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Link: https://lore.kernel.org/r/20200718193457.30046-3-vdumpa@nvidia.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent cd8479c commit 6c019f4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/iommu/arm-smmu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,10 +2123,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
21232123
if (err)
21242124
return err;
21252125

2126-
smmu = arm_smmu_impl_init(smmu);
2127-
if (IS_ERR(smmu))
2128-
return PTR_ERR(smmu);
2129-
21302126
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
21312127
ioaddr = res->start;
21322128
smmu->base = devm_ioremap_resource(dev, res);
@@ -2138,6 +2134,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
21382134
*/
21392135
smmu->numpage = resource_size(res);
21402136

2137+
smmu = arm_smmu_impl_init(smmu);
2138+
if (IS_ERR(smmu))
2139+
return PTR_ERR(smmu);
2140+
21412141
num_irqs = 0;
21422142
while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, num_irqs))) {
21432143
num_irqs++;

0 commit comments

Comments
 (0)