devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
To: paul@crapouillou.net, robh+dt@kernel.org,
	mturquette@baylibre.com, sboyd@kernel.org
Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC
Date: Sat, 12 Feb 2022 15:09:28 +0000	[thread overview]
Message-ID: <20220212150927.39513-2-aidanmacdonald.0x0@gmail.com> (raw)
In-Reply-To: <20220212150927.39513-1-aidanmacdonald.0x0@gmail.com>

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.

Fixes: dc6a81c3382f74fe ("clk: Ingenic: Add support for TCU of X1000.")
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
I've just realized, maybe this is an ABI break. Now that the TCU clock is
required, the driver probe will fail if given an old device tree which is
missing that clock. Is it necessary to add a hack of some sort to support
the old device tree?

 drivers/clk/ingenic/tcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


  reply	other threads:[~2022-02-12 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 15:09 [PATCH v2 1/2] dts: x1000: Fix missing TCU clock in tcu device node Aidan MacDonald
2022-02-12 15:09 ` Aidan MacDonald [this message]
2022-02-14 11:52   ` [PATCH v2 2/2] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC Paul Cercueil
2022-02-14 11:52 ` [PATCH v2 1/2] dts: x1000: Fix missing TCU clock in tcu device node Paul Cercueil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220212150927.39513-2-aidanmacdonald.0x0@gmail.com \
    --to=aidanmacdonald.0x0@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=paul@crapouillou.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).