linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Clock fixes for Ingenic SoCs
@ 2022-02-08  1:00 Aidan MacDonald
  2022-02-08  1:00 ` [PATCH 1/3] clk: ingenic: Allow specifying common clock flags Aidan MacDonald
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Aidan MacDonald @ 2022-02-08  1:00 UTC (permalink / raw)
  To: paul, mturquette, sboyd; +Cc: linux-mips, linux-kernel

I ran across a problem trying to get Linux running on an Ingenic X1000 SoC:
since the memory clock isn't referenced by any driver, it appears unused and
gets disabled automatically. After that, the system hangs on any RAM access.

There is a hack in board-ingenic.c to forcibly enable the CPU clock, but this
is insufficient for the X1000 since the memory clock has its own gate and mux
that isn't tied to the CPU.

This patch series fixes the bug by adding CLK_IS_CRITICAL flags to important
clocks, which seems to be the approach used in many other SoC clock drivers.

It's my first time submitting patches to the kernel so let me know if I
messed anything up.

Aidan MacDonald (3):
  clk: ingenic: Allow specifying common clock flags
  clk: ingenic: Mark critical clocks in Ingenic SoCs
  mips: ingenic: Do not manually reference the CPU clock

 arch/mips/generic/board-ingenic.c | 26 --------------------------
 drivers/clk/ingenic/cgu.c         |  2 +-
 drivers/clk/ingenic/cgu.h         |  3 +++
 drivers/clk/ingenic/jz4725b-cgu.c |  2 ++
 drivers/clk/ingenic/jz4740-cgu.c  |  2 ++
 drivers/clk/ingenic/jz4760-cgu.c  |  2 ++
 drivers/clk/ingenic/jz4770-cgu.c  |  1 +
 drivers/clk/ingenic/jz4780-cgu.c  |  3 +++
 drivers/clk/ingenic/x1000-cgu.c   |  3 +++
 drivers/clk/ingenic/x1830-cgu.c   |  3 +++
 10 files changed, 20 insertions(+), 27 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-02-09 23:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08  1:00 [PATCH 0/3] Clock fixes for Ingenic SoCs Aidan MacDonald
2022-02-08  1:00 ` [PATCH 1/3] clk: ingenic: Allow specifying common clock flags Aidan MacDonald
2022-02-08  1:00 ` [PATCH 2/3] clk: ingenic: Mark critical clocks in Ingenic SoCs Aidan MacDonald
2022-02-08  1:00 ` [PATCH 3/3] mips: ingenic: Do not manually reference the CPU clock Aidan MacDonald
2022-02-09 15:44 ` [PATCH 0/3] Clock fixes for Ingenic SoCs Paul Cercueil
2022-02-09 23:38   ` Aidan MacDonald

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).