All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 0/4] of: Register clocks for Runtime PM with PM core
@ 2014-04-24 10:13 ` Geert Uytterhoeven
  0 siblings, 0 replies; 158+ messages in thread
From: Geert Uytterhoeven @ 2014-04-24 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

On SoCs like ARM/SH-mobile, gate clocks are available for modules, allowing
Runtime PM for a device controlled by a gate clock.

On legacy shmobile kernels, this is handled by the PM runtime code in
drivers/sh/pm_runtime.c, which installs a clock notifier for the platform
bus, registering the "NULL" clock of each platform device with the PM core.
This approach is also used on davinci, keystone, and omap1.

On multi-platform shmobile kernels, this was not handled at all, leading
to spurious disabled clocks on drivers relying on Runtime PM, depending on
implicit reset state, or on the bootloader.

A first solution, enabling the PM runtime code in drivers/sh/pm_runtime.c
in a multi-platform-safe way, was provided by the patch series
"[PATCH v2 00/17] ARM: shmobile: Enable drivers/sh/pm_runtime.c on
multi-platform" (http://www.spinics.net/lists/linux-sh/msg30887.html).

Here is an alternative approach, avoiding the reliance on C board files,
which are being phased out.

This is also related to a patch series by Felipe Balbi ("[RFC/PATCH] base:
platform: add generic clock handling for platform-bus",
https://lkml.org/lkml/2014/1/31/290)

This series:
  1. Lets the MSTP clock driver indicate that its clocks are suitable for
     Runtime PM, 
  2. Lets the DT code retrieve clock information when adding a device
     (it already retrieves information for resources (registers, irq) ---
     unfortunately clocks are not resources), and registering clocks
     suitable for Runtime PM with the PM core.
     If Runtime PM is disabled, the clocks are just enabled.

Note that this works for devices instantiated from DT only.
Fortunately the drivers for the remaining platform devices (SCI and CMT)
handle clocks theirselves, without Runtime PM, so they get properly enabled.

Patches:
  - [1/4] clk: Add CLK_RUNTIME_PM and clk_may_runtime_pm()
  - [2/4] PM / clock_ops: Add pm_clk_add_clk()
  - [3/4] of/clk: Register clocks suitable for Runtime PM with the
  - [4/4] clk: shmobile: mstp: Set CLK_RUNTIME_PM flag

This series was tested on Renesas r8a7791, using the Koelsch development
board.

Thanks for your comments!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

end of thread, other threads:[~2014-12-12 17:52 UTC | newest]

Thread overview: 158+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 10:13 [PATCH/RFC 0/4] of: Register clocks for Runtime PM with PM core Geert Uytterhoeven
2014-04-24 10:13 ` Geert Uytterhoeven
2014-04-24 10:13 ` Geert Uytterhoeven
2014-04-24 10:13 ` [PATCH/RFC 1/4] clk: Add CLK_RUNTIME_PM and clk_may_runtime_pm() Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13 ` [PATCH/RFC 2/4] PM / clock_ops: Add pm_clk_add_clk() Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13 ` [PATCH/RFC 3/4] of/clk: Register clocks suitable for Runtime PM with the PM core Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 13:11   ` Ulf Hansson
2014-04-24 13:11     ` Ulf Hansson
2014-04-24 13:11     ` Ulf Hansson
2014-04-24 13:11     ` Ulf Hansson
2014-04-24 14:09     ` Geert Uytterhoeven
2014-04-24 14:09       ` Geert Uytterhoeven
2014-04-24 14:09       ` Geert Uytterhoeven
2014-04-24 14:09       ` Geert Uytterhoeven
2014-04-26  1:59     ` Tomasz Figa
2014-04-26  1:59       ` Tomasz Figa
2014-04-26  1:59       ` Tomasz Figa
2014-04-26  1:59       ` Tomasz Figa
2014-05-02  8:13       ` Ulf Hansson
2014-05-02  8:13         ` Ulf Hansson
2014-05-02  8:13         ` Ulf Hansson
2014-05-02  8:13         ` Ulf Hansson
2014-05-02 14:58         ` Geert Uytterhoeven
2014-05-02 14:58           ` Geert Uytterhoeven
2014-05-02 14:58           ` Geert Uytterhoeven
2014-05-02 14:58           ` Geert Uytterhoeven
2014-05-06  7:58           ` Ulf Hansson
2014-05-06  7:58             ` Ulf Hansson
2014-05-06  7:58             ` Ulf Hansson
2014-05-06  7:58             ` Ulf Hansson
2014-04-30 21:23     ` Laurent Pinchart
2014-04-30 21:23       ` Laurent Pinchart
2014-04-30 21:23       ` Laurent Pinchart
2014-04-30 21:23       ` Laurent Pinchart
2014-04-30 22:06       ` Geert Uytterhoeven
2014-04-30 22:06         ` Geert Uytterhoeven
2014-04-30 22:06         ` Geert Uytterhoeven
2014-04-30 22:06         ` Geert Uytterhoeven
2014-04-25 23:44   ` Kevin Hilman
2014-04-25 23:44     ` Kevin Hilman
2014-04-25 23:44     ` Kevin Hilman
2014-04-29 13:16     ` Grant Likely
2014-04-29 13:16       ` Grant Likely
2014-04-29 13:16       ` Grant Likely
2014-04-30 21:25       ` Laurent Pinchart
2014-04-30 21:25         ` Laurent Pinchart
2014-04-30 21:25         ` Laurent Pinchart
2014-04-30 21:25         ` Laurent Pinchart
2014-04-30 21:33         ` Ben Dooks
2014-04-30 21:33           ` Ben Dooks
2014-04-30 21:33           ` Ben Dooks
2014-04-30 21:54       ` Geert Uytterhoeven
2014-04-30 21:54         ` Geert Uytterhoeven
2014-04-30 21:54         ` Geert Uytterhoeven
2014-04-30 21:54         ` Geert Uytterhoeven
2014-05-01  8:03         ` Grant Likely
2014-05-01  8:03           ` Grant Likely
2014-05-01  8:03           ` Grant Likely
2014-05-01  8:03           ` Grant Likely
2014-05-01 13:41           ` Geert Uytterhoeven
2014-05-01 13:41             ` Geert Uytterhoeven
2014-05-01 13:41             ` Geert Uytterhoeven
2014-05-01 13:41             ` Geert Uytterhoeven
2014-05-01 13:56             ` Grant Likely
2014-05-01 13:56               ` Grant Likely
2014-05-01 13:56               ` Grant Likely
2014-05-01 13:56               ` Grant Likely
2014-05-01 14:46               ` Geert Uytterhoeven
2014-05-01 14:46                 ` Geert Uytterhoeven
2014-05-01 14:46                 ` Geert Uytterhoeven
2014-05-01 14:46                 ` Geert Uytterhoeven
2014-04-30 21:47     ` Geert Uytterhoeven
2014-04-30 21:47       ` Geert Uytterhoeven
2014-04-30 21:47       ` Geert Uytterhoeven
2014-04-30 21:47       ` Geert Uytterhoeven
2014-05-02  8:56   ` Ulf Hansson
2014-05-02  8:56     ` Ulf Hansson
2014-05-02  8:56     ` Ulf Hansson
2014-05-02  8:56     ` Ulf Hansson
2014-05-02 14:35     ` Geert Uytterhoeven
2014-05-02 14:35       ` Geert Uytterhoeven
2014-05-02 14:35       ` Geert Uytterhoeven
2014-05-02 14:35       ` Geert Uytterhoeven
2014-05-06  7:43       ` Ulf Hansson
2014-05-06  7:43         ` Ulf Hansson
2014-05-06  7:43         ` Ulf Hansson
2014-05-06  7:43         ` Ulf Hansson
2014-04-24 10:13 ` [PATCH/RFC 4/4] clk: shmobile: mstp: Set CLK_RUNTIME_PM flag Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-24 10:13   ` Geert Uytterhoeven
2014-04-30 21:29 ` [PATCH/RFC 0/4] of: Register clocks for Runtime PM with PM core Laurent Pinchart
2014-04-30 21:29   ` Laurent Pinchart
2014-04-30 21:29   ` Laurent Pinchart
2014-04-30 22:17   ` Geert Uytterhoeven
2014-04-30 22:17     ` Geert Uytterhoeven
2014-04-30 22:17     ` Geert Uytterhoeven
2014-04-30 22:17     ` Geert Uytterhoeven
2014-06-12 16:07 ` [RFC PATCH 0/2] use named clocks list to register clocks for PM clock domain Grygorii Strashko
2014-06-12 16:53   ` Grygorii Strashko
2014-06-12 16:53   ` Grygorii Strashko
2014-06-12 16:53   ` Grygorii Strashko
2014-06-12 16:06   ` [RFC PATCH 2/2] of/clk: use "clkops-clocks" to specify clocks handled by clock_ops domain Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko
2014-07-28 14:05     ` Grant Likely
2014-07-28 14:05       ` Grant Likely
2014-07-28 14:05       ` Grant Likely
2014-07-28 14:05       ` Grant Likely
2014-07-28 17:03       ` Grygorii Strashko
2014-07-28 17:47         ` Grygorii Strashko
2014-07-28 17:47         ` Grygorii Strashko
2014-07-28 17:47         ` Grygorii Strashko
2014-07-29  5:52         ` Grant Likely
2014-07-29  5:52           ` Grant Likely
2014-07-29  5:52           ` Grant Likely
2014-07-29  5:52           ` Grant Likely
2014-07-30  0:06           ` Laurent Pinchart
2014-07-30  0:06             ` Laurent Pinchart
2014-07-30  0:06             ` Laurent Pinchart
2014-07-30  0:06             ` Laurent Pinchart
2014-07-30 12:41             ` Grygorii Strashko
2014-07-30 13:25               ` Grygorii Strashko
2014-07-30 13:25               ` Grygorii Strashko
2014-07-30 13:25               ` Grygorii Strashko
2014-12-12 17:40               ` Laurent Pinchart
2014-12-12 17:40                 ` Laurent Pinchart
2014-12-12 17:40                 ` Laurent Pinchart
2014-12-12 17:40                 ` Laurent Pinchart
2014-08-04 11:28             ` Geert Uytterhoeven
2014-08-04 11:28               ` Geert Uytterhoeven
2014-08-04 11:28               ` Geert Uytterhoeven
2014-08-04 11:28               ` Geert Uytterhoeven
2014-08-04 15:21               ` Laurent Pinchart
2014-08-04 15:21                 ` Laurent Pinchart
2014-08-04 15:21                 ` Laurent Pinchart
2014-08-04 15:21                 ` Laurent Pinchart
2014-09-08 20:13             ` Kevin Hilman
2014-09-08 20:13               ` Kevin Hilman
2014-09-08 20:13               ` Kevin Hilman
2014-09-08 20:13               ` Kevin Hilman
2014-12-12 17:52               ` Laurent Pinchart
2014-12-12 17:52                 ` Laurent Pinchart
2014-12-12 17:52                 ` Laurent Pinchart
2014-12-12 17:52                 ` Laurent Pinchart
2014-06-12 16:07   ` [RFC PATCH 1/2] clk: of: introduce of_clk_get_from_set() Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko
2014-06-12 16:53     ` Grygorii Strashko

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.