Skip to content

clk: Provide option to unprepare unused clocks at late init

Mike Turquette linux-arm-kernel 1 version New

Get series with b4
b4 am 20130124184944.10623.20870@quantum

Versions newest first

  1. v1 Latest1 of 4 patches 0 repliesNew

1 of 4 patches is in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4clk: Introduce optional is_prepared callback+0 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] clk: Provide option to unprepare unused clocks at late init

Quoting Ulf Hansson (2013-01-24 08:45:52)

Quoted 10 lines

From: Ulf Hansson <[email protected]>

The disable_unused sequence executed at late init, is already handling the fast unused ungated clocks to be gated. This patchset extends this sequence to include the slow unused prepared clocks to be unprepared.

The default behavior will not change in this patchset. To unprepare unused clocks during the disable_unused sequence, the clk_hw needs to implement the new optional callback, is_prepared.

Quoted 9 lines

The motivation for this patchset is to save power. Clocks that is from bootloaders prepared|enabled, but not used should be unprepared|disabled.

Patch 4 is specific for ux500, which implements the is_prepared callback for it's PRMCU clocks.

Note that patch 1-3 has been sent earlier, but since a proof of concept patch could be useful, as patch 4 is, the hole patchset is resent.

Hi Ulf,

I had some minor discussion in patch #1. Otherwise patches #2 & #3 look good to me.

Patch #4 is a bit interesting. There is nothing wrong with it per se, but the general layering of the prcmu power stuff is the opposite of how I had envisioned things. Your .prepare callback is making calls to some pm_qos api but a quick grep did not reveal any definitions for those functions, just some stubs in include/linux/mfd/dbx500-prcmu.h.

Do these functions scale voltage? I had figured that some day per-device pm qos apis would call the clk api, not the other way around.

Anyways that is just food for thought and no reason to block patch #4.

Regards,
Mike

Quoted 13 lines

Ulf Hansson (4):
clk: Introduce optional is_prepared callback
clk: Unprepare the unused prepared slow clocks at late init
clk: Introduce optional unprepare_unused callback
clk: ux500: Support is_prepared callback for clk-prcmu

 drivers/clk/clk.c             |   53 ++++++++++++++++
 drivers/clk/ux500/clk-prcmu.c |  134 ++++++++++++++++++++++++-----------------
 include/linux/clk-provider.h  |   11 ++++
 3 files changed, 144 insertions(+), 54 deletions(-)
Signature · 1 line
1.7.10