iommu/exynos: Prepare clocks when needed, not in driver probe
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 23 May 2016 09:30:09 +0000 (11:30 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 15 Jun 2016 11:59:58 +0000 (13:59 +0200)
commitfecc49db884b902f7abbea4c9287d17a56966be4
treebb14c90246772c708e09669b4dad65ec10bae557
parent01324ab2c990bbd39ec0ef388b7c311a54452a0b
iommu/exynos: Prepare clocks when needed, not in driver probe

Make clock preparation together with clk_enable(). This way inactive
SYSMMU controllers will not keep clocks prepared all the time.
This change allows more fine graded power management in the future.
All the code assumes that clock management doesn't fail, so guard
clock_prepare_enable() it with BUG_ON().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c