clk: samsung: exynos5433: Add support for runtime PM
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 21 Aug 2017 08:05:01 +0000 (10:05 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:55:46 +0000 (14:55 +0900)
commitf92166d284b24b53c8c3f40e678f47deb45563be
treebae4654a4f2dca75cb4d49ae9f302e487735dbef
parent5fef9a88c5d705e8ce0147ee9d0f1738a66ee137
clk: samsung: exynos5433: Add support for runtime PM

Add runtime pm support for all clock controller units (CMU), which belong
to power domains and require special handling during on/off operations.
Typically special values has to be written to MUX registers to change
internal clocks parents to OSC clock before turning power off. During such
operation all clocks, which enter CMU has to be enabled to let MUX to
stabilize. Also for each CMU there is one special parent clock, which has
to be enabled all the time when any access to CMU registers is being done.

This patch solves most of the mysterious external abort and freeze issues
caused by a lack of proper parent CMU clock enabled or incorrect turn off
procedure.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1503302703-13801-4-git-send-email-m.szyprowski@samsung.com
Documentation/devicetree/bindings/clock/exynos5433-clock.txt
drivers/clk/samsung/clk-exynos5433.c
drivers/clk/samsung/clk.h