diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-05-23 13:01:27 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-06-15 13:59:58 +0200 |
commit | 96f6655700d16d1bae8ef49db6ce28607ebee6f3 (patch) | |
tree | fb482ee885bd5746464af2f4b386491dd7b419f1 | |
parent | fecc49db884b902f7abbea4c9287d17a56966be4 (diff) | |
download | linux-96f6655700d16d1bae8ef49db6ce28607ebee6f3.tar.gz linux-96f6655700d16d1bae8ef49db6ce28607ebee6f3.tar.bz2 linux-96f6655700d16d1bae8ef49db6ce28607ebee6f3.zip |
iommu/exynos: Prepare for deferred probe support
Register iommu_ops at the end of successful probe instead of doing that
unconditionally. This makes Exynos IOMMU driver ready for deferred probe
caused by not-yet-available clocks.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/exynos-iommu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index e0b834375f17..633e6d023c0d 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -581,6 +581,8 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data, spin_unlock_irqrestore(&data->lock, flags); } +static struct iommu_ops exynos_iommu_ops; + static int __init exynos_sysmmu_probe(struct platform_device *pdev) { int irq, ret; @@ -654,6 +656,8 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev) pm_runtime_enable(dev); + of_iommu_set_ops(dev->of_node, &exynos_iommu_ops); + return 0; } @@ -1347,7 +1351,6 @@ static int __init exynos_iommu_of_setup(struct device_node *np) if (!dma_dev) dma_dev = &pdev->dev; - of_iommu_set_ops(np, &exynos_iommu_ops); return 0; } |