提交 6c019f4e 编写于 作者: K Krishna Reddy 提交者: Will Deacon

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: NKrishna Reddy <vdumpa@nvidia.com>
Reviewed-by: NJon Hunter <jonathanh@nvidia.com>
Reviewed-by: NNicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: NPritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
Reviewed-by: NThierry Reding <thierry.reding@gmail.com>
Link: https://lore.kernel.org/r/20200718193457.30046-3-vdumpa@nvidia.comSigned-off-by: NWill Deacon <will@kernel.org>
上级 cd8479cf
无相关合并请求
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部