linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] clk: meson: g12a: handle clock hw changes while in suspend
@ 2019-09-19 10:25 Neil Armstrong
  2019-09-19 10:25 ` [PATCH RFC 1/2] clk: introduce clk_invalidate_rate() Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Neil Armstrong @ 2019-09-19 10:25 UTC (permalink / raw)
  To: sboyd, jbrunet, mturquette
  Cc: linux-amlogic, linux-kernel, linux-clk, linux-arm-kernel, Neil Armstrong

This serie aime to support when the suspend/resume firmware alters the
clock tree, leading to an incorrect representation of the clock tree
after a resume from suspend-to-mem.

For the Amlogic G12A/G12B/SM1 case, the SCPI firmware handling suspend
alters the CPU clock tree in various ways.

Since we know which part of the tree is possibly altered, we introduce here
the clk_invalidate_rate() function that will rebuild the tree from the
hardware registers in case parents and dividers have changed.

Finally we call clk_invalidate_rate() from a new resume callback to refresh
the CPU clock tree after a resume.

With the clock tree refreshed, CCF can now handle the new clock tree
configuration and avoid crashing the system on further DVFS set_rates.

Neil Armstrong (2):
  clk: introduce clk_invalidate_rate()
  clk: meson: g12a: add suspend-resume hooks

 drivers/clk/clk.c        | 70 +++++++++++++++++++++++++++++++++++++++
 drivers/clk/meson/g12a.c | 71 +++++++++++++++++++++++++++++++++++-----
 include/linux/clk.h      | 13 ++++++++
 3 files changed, 146 insertions(+), 8 deletions(-)

-- 
2.22.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2019-09-27 16:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 10:25 [PATCH RFC 0/2] clk: meson: g12a: handle clock hw changes while in suspend Neil Armstrong
2019-09-19 10:25 ` [PATCH RFC 1/2] clk: introduce clk_invalidate_rate() Neil Armstrong
2019-09-27  0:14   ` Stephen Boyd
2019-09-27  6:40     ` Neil Armstrong
2019-09-27 16:38       ` Jerome Brunet
2019-09-19 10:25 ` [PATCH RFC 2/2] clk: meson: g12a: add suspend-resume hooks Neil Armstrong
2019-09-26 20:46 ` [PATCH RFC 0/2] clk: meson: g12a: handle clock hw changes while in suspend Kevin Hilman
2019-09-27  6:38   ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).