mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Jonathan Neuschäfer" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: j.neuschaefer@gmx.net, Joel Stanley <joel@jms.id.au>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use
Date: Fri, 09 Dec 2022 15:47:23 -0000	[thread overview]
Message-ID: <167060084346.4906.1652754113589535961.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221104161850.2889894-3-j.neuschaefer@gmx.net>

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     db78539fc95cf62b0b8f274368fcd8202eac91f9
Gitweb:        https://git.kernel.org/tip/db78539fc95cf62b0b8f274368fcd8202eac91f9
Author:        Jonathan Neuschäfer <j.neuschaefer@gmx.net>
AuthorDate:    Fri, 04 Nov 2022 17:18:46 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Fri, 02 Dec 2022 12:48:28 +01:00

clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use

In the WPCM450 SoC, the clocks for each timer can be gated individually.
To prevent the timer 1 clock from being gated, enable it explicitly.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20221104161850.2889894-3-j.neuschaefer@gmx.net
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
 drivers/clocksource/timer-npcm7xx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c
index a00520c..9af30af 100644
--- a/drivers/clocksource/timer-npcm7xx.c
+++ b/drivers/clocksource/timer-npcm7xx.c
@@ -188,6 +188,7 @@ static void __init npcm7xx_clocksource_init(void)
 
 static int __init npcm7xx_timer_init(struct device_node *np)
 {
+	struct clk *clk;
 	int ret;
 
 	ret = timer_of_init(np, &npcm7xx_to);
@@ -199,6 +200,15 @@ static int __init npcm7xx_timer_init(struct device_node *np)
 	npcm7xx_to.of_clk.rate = npcm7xx_to.of_clk.rate /
 		(NPCM7XX_Tx_MIN_PRESCALE + 1);
 
+	/* Enable the clock for timer1, if it exists */
+	clk = of_clk_get(np, 1);
+	if (clk) {
+		if (!IS_ERR(clk))
+			clk_prepare_enable(clk);
+		else
+			pr_warn("%pOF: Failed to get clock for timer1: %pe", np, clk);
+	}
+
 	npcm7xx_clocksource_init();
 	npcm7xx_clockevents_init();
 

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

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 16:18 [PATCH v5 0/6] Nuvoton WPCM450 clock and reset driver Jonathan Neuschäfer
2022-11-04 16:18 ` [PATCH v5 1/6] dt-bindings: timer: nuvoton,npcm7xx-timer: Allow specifying all clocks Jonathan Neuschäfer
2022-12-09 15:47   ` [tip: timers/core] " tip-bot2 for Jonathan Neuschäfer
2022-11-04 16:18 ` [PATCH v5 2/6] clocksource: timer-npcm7xx: Enable timer 1 clock before use Jonathan Neuschäfer
2022-12-09 15:47   ` tip-bot2 for Jonathan Neuschäfer [this message]
2022-11-04 16:18 ` [PATCH v5 3/6] dt-bindings: clock: Add Nuvoton WPCM450 clock/reset controller Jonathan Neuschäfer
2022-12-09 20:21   ` Stephen Boyd
2023-04-12 19:13     ` Jonathan Neuschäfer
2023-04-12 20:34       ` Stephen Boyd
2023-04-12 21:24         ` Jonathan Neuschäfer
2022-11-04 16:18 ` [PATCH v5 4/6] ARM: dts: wpcm450: Add clock controller node Jonathan Neuschäfer
2022-11-04 16:18 ` [PATCH v5 5/6] clk: wpcm450: Add Nuvoton WPCM450 clock/reset controller driver Jonathan Neuschäfer
2022-12-09 20:21   ` Stephen Boyd
2022-12-12  7:30   ` Tomer Maimon
2022-12-13 14:53     ` Jonathan Neuschäfer
2022-11-04 16:18 ` [PATCH v5 6/6] [NOT FOR MERGE] ARM: dts: wpcm450: Switch clocks to clock controller Jonathan Neuschäfer
2022-11-22  1:40 ` [PATCH v5 0/6] Nuvoton WPCM450 clock and reset driver Joel Stanley
2022-11-22  8:09   ` Daniel Lezcano

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=167060084346.4906.1652754113589535961.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=daniel.lezcano@kernel.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@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

all inboxes | Powered by JetHome®