diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-05-23 11:30:08 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-06-15 13:59:58 +0200 |
commit | 01324ab2c990bbd39ec0ef388b7c311a54452a0b (patch) | |
tree | a9e180fa5d086b8c4ebc2c34b83a882a74eb3ea1 /drivers/iommu | |
parent | iommu/exynos: Return proper errors from getting clocks (diff) | |
download | linux-01324ab2c990bbd39ec0ef388b7c311a54452a0b.tar.xz linux-01324ab2c990bbd39ec0ef388b7c311a54452a0b.zip |
iommu/exynos: Fix master clock management for inactive SYSMMU
If SYSMMU controller is not active, there is no point in enabling master's
clock just for doing the the of internal state. This patch moves enabling
that clock to the block which actually does the register access.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/exynos-iommu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 989365682d14..018bcd5d5edc 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -524,16 +524,15 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data, { unsigned long flags; - clk_enable(data->clk_master); spin_lock_irqsave(&data->lock, flags); - if (is_sysmmu_active(data)) { - if (data->version >= MAKE_MMU_VER(3, 3)) - __sysmmu_tlb_invalidate_entry(data, iova, 1); + if (is_sysmmu_active(data) && data->version >= MAKE_MMU_VER(3, 3)) { + clk_enable(data->clk_master); + __sysmmu_tlb_invalidate_entry(data, iova, 1); + clk_disable(data->clk_master); } spin_unlock_irqrestore(&data->lock, flags); - clk_disable(data->clk_master); } static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data, |