devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC
@ 2022-02-09 23:01 Aidan MacDonald
  2022-02-10  9:06 ` Zhou Yanjie
  2022-02-10 10:52 ` Paul Cercueil
  0 siblings, 2 replies; 3+ messages in thread
From: Aidan MacDonald @ 2022-02-09 23:01 UTC (permalink / raw)
  To: paul, robh+dt, mturquette, sboyd
  Cc: linux-mips, devicetree, linux-clk, linux-kernel

The X1000 does have a TCU clock gate, so pass it to the driver.
Without this the TCU can be gated automatically, which prevents
timers from running and stops register writes from taking effect.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 arch/mips/boot/dts/ingenic/x1000.dtsi | 5 +++--
 drivers/clk/ingenic/tcu.c             | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
index 8bd27edef216..c69df8eb158e 100644
--- a/arch/mips/boot/dts/ingenic/x1000.dtsi
+++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
@@ -111,8 +111,9 @@ tcu: timer@10002000 {
 
 		clocks = <&cgu X1000_CLK_RTCLK>,
 			 <&cgu X1000_CLK_EXCLK>,
-			 <&cgu X1000_CLK_PCLK>;
-		clock-names = "rtc", "ext", "pclk";
+			 <&cgu X1000_CLK_PCLK>,
+			 <&cgu X1000_CLK_TCU>;
+		clock-names = "rtc", "ext", "pclk", "tcu";
 
 		interrupt-controller;
 		#interrupt-cells = <1>;
diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c
index 77acfbeb4830..9c86043f673a 100644
--- a/drivers/clk/ingenic/tcu.c
+++ b/drivers/clk/ingenic/tcu.c
@@ -320,7 +320,7 @@ static const struct ingenic_soc_info jz4770_soc_info = {
 static const struct ingenic_soc_info x1000_soc_info = {
 	.num_channels = 8,
 	.has_ost = false, /* X1000 has OST, but it not belong TCU */
-	.has_tcu_clk = false,
+	.has_tcu_clk = true,
 };
 
 static const struct of_device_id __maybe_unused ingenic_tcu_of_match[] __initconst = {
-- 
2.34.1


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

end of thread, other threads:[~2022-02-10 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 23:01 [PATCH] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC Aidan MacDonald
2022-02-10  9:06 ` Zhou Yanjie
2022-02-10 10:52 ` Paul Cercueil

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