All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Add runtime PM support for clocks (on Exynos SoC example)
@ 2016-09-01 13:45 ` Marek Szyprowski
  0 siblings, 0 replies; 68+ messages in thread
From: Marek Szyprowski @ 2016-09-01 13:45 UTC (permalink / raw)
  To: linux-clk, linux-pm, linux-samsung-soc, linux-arm-kernel
  Cc: Marek Szyprowski, Stephen Boyd, Michael Turquette, Ulf Hansson,
	Sylwester Nawrocki, Chanwoo Choi, Inki Dae, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz

Dear All,

This patchset adds runtime PM support to common clock framework. This is an
attempt to implement support for clock controllers, which belongs to a power
domain. This approach works surprisingly well on Exynos 4412 and 5433 SoCs,
what allowed us to solve various freeze/crash issues related to power
management.

The main idea behind this patchset is to keep clock's controller power domain
enabled every time when at least one of its clock is enabled or access to its
registers is being made. Clock controller driver (clock provider) can
supply a struct device pointer, which is the used by clock core for tracking and
managing clock's controller runtime pm state. Each clk_prepare() operation will
first call pm_runtime_get_sync() on the supplied device, while clk_unprepare()
will do pm_runtime_put() at the end.

This runtime PM feature has been tested with Exynos4412 and Exynos5433 clocks
drivers. Both have some clocks, which belongs to respective power domains and
need special handling during power on/off procedures. Till now it wasn't handled
at all, what caused various problems.

Patches for exynos 4412 and 5433 clocks drivers change the way the clock
provider is initialized. Instead of CLK_OF_DECLARE based initialization, a
complete platform device driver infrastructure is being used. This is needed to
let driver to use runtime pm feature and integrate with generic power domains.
The side-effect of this change is a delay in clock provider registeration
during system boot, so early initialized drivers might get EPROBEDEFER error
when requesting their clocks. This is an issue for IOMMU drivers, so
this patchset will be fully functional once the deferred probe for IOMMU
will be merged.

The side-effect of this patchset is the one can finally read
/sys/kernel/debug/clk/clk_summary on all Exynos4412 boards without any freeze.

If one wants to test this patchset (on Exynos4412 Trats2 device with FIMC-IS
driver), I've provided a branch with all needed patches (fixes for Exynos,
FIMC-IS driver and IOMMU deferred probe):
https://git.linaro.org/people/marek.szyprowski/linux-srpol.git v4.8-clocks-pm

Patches are based on vanilla v4.8-rc4 kernel.

Best regards
Marek Szyprowski
Samsung R&D Institute Poland

Marek Szyprowski (5):
  clk: add support for runtime pm
  clock: samsung: add support for runtime pm
  clocks: exynos4x12: add runtime pm support for ISP clocks
  ARM: dts: exynos: add support for ISP power domain to exynos4x12
    clocks device
  clocks: exynos5433: add runtime pm support

 .../devicetree/bindings/clock/exynos4-clock.txt    |  22 +
 arch/arm/boot/dts/exynos4x12.dtsi                  |   5 +
 drivers/clk/clk.c                                  |  84 +++-
 drivers/clk/samsung/clk-exynos4.c                  | 228 +++++++---
 drivers/clk/samsung/clk-exynos5433.c               | 462 ++++++++++++++++-----
 drivers/clk/samsung/clk-pll.c                      |   2 +-
 drivers/clk/samsung/clk.c                          |  12 +-
 drivers/clk/samsung/clk.h                          |   1 +
 8 files changed, 641 insertions(+), 175 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2016-09-15 14:13 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 13:45 [PATCH 0/5] Add runtime PM support for clocks (on Exynos SoC example) Marek Szyprowski
2016-09-01 13:45 ` Marek Szyprowski
2016-09-01 13:45 ` Marek Szyprowski
2016-09-01 13:45 ` [PATCH 1/5] clk: add support for runtime pm Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 15:10   ` kbuild test robot
2016-09-01 15:10     ` kbuild test robot
2016-09-01 15:10     ` kbuild test robot
2016-09-01 15:10   ` [PATCH] clk: fix boolreturn.cocci warnings kbuild test robot
2016-09-01 15:10     ` kbuild test robot
2016-09-01 15:10     ` kbuild test robot
2016-09-08  0:19   ` [PATCH 1/5] clk: add support for runtime pm Stephen Boyd
2016-09-08  0:19     ` Stephen Boyd
     [not found]     ` <CGME20160912101857eucas1p29b2bbd5ac0eda92284091ad1b86decc4@eucas1p2.samsung.com>
2016-09-12 10:18       ` Marek Szyprowski
2016-09-12 10:18         ` Marek Szyprowski
2016-09-12 22:31         ` Stephen Boyd
2016-09-12 22:31           ` Stephen Boyd
2016-09-13  9:07           ` Marek Szyprowski
2016-09-13  9:07             ` Marek Szyprowski
2016-09-14 21:39             ` Stephen Boyd
2016-09-14 21:39               ` Stephen Boyd
2016-09-15  8:32               ` Marek Szyprowski
2016-09-15  8:32                 ` Marek Szyprowski
2016-09-13  7:24     ` Ulf Hansson
2016-09-13  7:24       ` Ulf Hansson
2016-09-13  8:49   ` Ulf Hansson
2016-09-13  8:49     ` Ulf Hansson
2016-09-13 13:13     ` Marek Szyprowski
2016-09-13 13:13       ` Marek Szyprowski
2016-09-13 15:03       ` Ulf Hansson
2016-09-13 15:03         ` Ulf Hansson
2016-09-14 10:11         ` Marek Szyprowski
2016-09-14 10:11           ` Marek Szyprowski
2016-09-01 13:45 ` [PATCH 2/5] clock: samsung: " Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 13:45 ` [PATCH 3/5] clocks: exynos4x12: add runtime pm support for ISP clocks Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 21:49   ` kbuild test robot
2016-09-01 21:49     ` kbuild test robot
2016-09-01 21:49     ` kbuild test robot
2016-09-01 13:45 ` [PATCH 4/5] ARM: dts: exynos: add support for ISP power domain to exynos4x12 clocks device Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-08  0:22   ` Stephen Boyd
2016-09-08  0:22     ` Stephen Boyd
     [not found]     ` <CGME20160912102332eucas1p145e79669788329b44343da62dcbe50ca@eucas1p1.samsung.com>
2016-09-12 10:23       ` Marek Szyprowski
2016-09-12 10:23         ` Marek Szyprowski
2016-09-12 22:28         ` Stephen Boyd
2016-09-12 22:28           ` Stephen Boyd
     [not found]           ` <20160912222852.GH7243-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-09-15 12:06             ` Marek Szyprowski
2016-09-15 12:06               ` Marek Szyprowski
2016-09-15 12:06               ` Marek Szyprowski
2016-09-15 14:13               ` Ulf Hansson
2016-09-15 14:13                 ` Ulf Hansson
2016-09-01 13:45 ` [PATCH 5/5] clocks: exynos5433: add runtime pm support Marek Szyprowski
2016-09-01 13:45   ` Marek Szyprowski
2016-09-01 16:55   ` Bartlomiej Zolnierkiewicz
2016-09-01 16:55     ` Bartlomiej Zolnierkiewicz
2016-09-01 16:55     ` Bartlomiej Zolnierkiewicz
2016-09-01 23:00   ` kbuild test robot
2016-09-01 23:00     ` kbuild test robot
2016-09-01 23:00     ` kbuild test robot
2016-09-02 19:05   ` kbuild test robot
2016-09-02 19:05     ` kbuild test robot
2016-09-02 19:05     ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.