From: "tip-bot2 for Peng Fan" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Peng Fan <peng.fan@nxp.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/drivers/imx-sysctr: handle nxp,no-divider property
Date: Tue, 04 Oct 2022 09:27:06 -0000 [thread overview]
Message-ID: <166487562691.401.3433013681547293513.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220902111207.2902493-3-peng.fan@oss.nxp.com>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 27b30995b75d1e79360c164ba179bca86ab76ba6
Gitweb: https://git.kernel.org/tip/27b30995b75d1e79360c164ba179bca86ab76ba6
Author: Peng Fan <peng.fan@nxp.com>
AuthorDate: Fri, 02 Sep 2022 19:12:07 +08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 20 Sep 2022 10:49:46 +02:00
clocksource/drivers/imx-sysctr: handle nxp,no-divider property
The previous hardware design embedds a internal divider for base clock.
New design not has that divider, so check the nxp,no-divider property,
if true, directly use base clock input, otherwise divide by 3 as before.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220902111207.2902493-3-peng.fan@oss.nxp.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/timer-imx-sysctr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c
index 523e376..5a7a951 100644
--- a/drivers/clocksource/timer-imx-sysctr.c
+++ b/drivers/clocksource/timer-imx-sysctr.c
@@ -134,8 +134,10 @@ static int __init sysctr_timer_init(struct device_node *np)
if (ret)
return ret;
- /* system counter clock is divided by 3 internally */
- to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
+ if (!of_property_read_bool(np, "nxp,no-divider")) {
+ /* system counter clock is divided by 3 internally */
+ to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
+ }
sys_ctr_base = timer_of_base(&to_sysctr);
cmpcr = readl(sys_ctr_base + CMPCR);
next prev parent reply other threads:[~2022-10-04 9:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 11:12 [PATCH 0/2] clocksource: sysctr: add " Peng Fan (OSS)
2022-09-02 11:12 ` [PATCH 1/2] dt-bindings: timer: nxp,sysctr-timer: " Peng Fan (OSS)
2022-09-08 13:11 ` Krzysztof Kozlowski
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Peng Fan
2022-09-02 11:12 ` [PATCH 2/2] clocksource/drivers/imx-sysctr: handle " Peng Fan (OSS)
2022-10-04 9:27 ` tip-bot2 for Peng Fan [this message]
2022-09-20 8:45 ` [PATCH 0/2] clocksource: sysctr: add " 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=166487562691.401.3433013681547293513.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peng.fan@nxp.com \
--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®