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 <[email protected]> Reviewed-by: Jon Hunter <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Reviewed-by: Pritesh Raithatha <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent cd8479c commit 6c019f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)