aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-08-21 13:56:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-13 18:14:27 -0700
commitc92d069acbd6b7852eee27f062b62d1521efe75b (patch)
treea3b7fb5d17537ce659528a2dda09d5ad98141008 /drivers
parent81ac5e7f75c97089f3e86955768f81096c7c5c22 (diff)
iommu/arm-smmu: don't enable SMMU device until probing has completed
commit fd90cecbde065eac6ecc3ef38abace725ad27010 upstream. We currently reset and enable the SMMU before the device has finished being probed, so if we fail later on (for example, because we couldn't request a global irq successfully) then we will leave the device in an active state. This patch delays the reset and enabling of the SMMU hardware until probing has completed. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/arm-smmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index a50f951c025..44e527660dd 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1839,8 +1839,6 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev)
goto out_put_parent;
}
- arm_smmu_device_reset(smmu);
-
for (i = 0; i < smmu->num_global_irqs; ++i) {
err = request_irq(smmu->irqs[i],
arm_smmu_global_fault,
@@ -1858,6 +1856,8 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev)
spin_lock(&arm_smmu_devices_lock);
list_add(&smmu->list, &arm_smmu_devices);
spin_unlock(&arm_smmu_devices_lock);
+
+ arm_smmu_device_reset(smmu);
return 0;
out_free_irqs: