From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
kernel <kernel@axis.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>
Subject: Re: [PATCH v2 3/4] clocksource/drivers/exynos_mct: Support local-timer-index property
Date: Wed, 30 Mar 2022 10:21:37 +0200 [thread overview]
Message-ID: <20220330082137.GA21079@axis.com> (raw)
In-Reply-To: <e8b58fc4-fdc2-7fca-f8f5-c45f0891b53b@samsung.com>
On Mon, Mar 21, 2022 at 09:00:08AM +0100, Marek Szyprowski wrote:
> Right, I've played a bit with MCT on some older Exynos SoCs (ARM 32bit
> based and even Exynos5433) and it looked that none of it enabled MCT FRC
> timer in their proprietary firmware. I've even proposed a patch for this
> once ([1]), but such approach has been rejected. I think that calling
> exynos4_mct_frc_start() unconditionally won't hurt.
Thank you for looking into this. The proposal was however not to avoid
changing when exynos4_mct_frc_start() is called, but to instead skip the
write to the Timer Enable bit of the G_TCON register if it is already
set, like in the below patch. (This is needed to avoid races when the
FRC is shared between CPUs in an AMP configuration, since TCON can be
modified for other reasons from the CPU which is using the global
comparator.)
If I understand your comment correctly, such a change should not cause
any difference at least on the platforms you looked at since there
MCT_G_TCON_START will not have been set at startup.
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 6db3d5511b0f..ed462e0a77ff 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -162,6 +162,9 @@ static void exynos4_mct_frc_start(void)
u32 reg;
reg = readl_relaxed(reg_base + EXYNOS4_MCT_G_TCON);
+ if (reg & MCT_G_TCON_START)
+ return;
+
reg |= MCT_G_TCON_START;
exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
}
next prev parent reply other threads:[~2022-03-30 8:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 14:24 [PATCH v2 0/4] clocksource: Add MCT support for ARTPEC-8 Vincent Whitchurch
2022-03-08 14:24 ` [PATCH v2 1/4] dt-bindings: timer: exynos4210-mct: Add ARTPEC-8 MCT Vincent Whitchurch
2022-03-08 14:37 ` Krzysztof Kozlowski
2022-03-08 14:24 ` [PATCH v2 2/4] dt-bindings: timer: exynos4210-mct: Support using only local timer Vincent Whitchurch
2022-03-08 14:44 ` Krzysztof Kozlowski
2022-03-08 14:24 ` [PATCH v2 3/4] clocksource/drivers/exynos_mct: Support local-timer-index property Vincent Whitchurch
2022-03-08 14:57 ` Krzysztof Kozlowski
2022-03-11 11:35 ` Vincent Whitchurch
2022-03-11 12:51 ` Krzysztof Kozlowski
2022-03-21 8:00 ` Marek Szyprowski
2022-03-30 8:21 ` Vincent Whitchurch [this message]
2022-04-07 7:48 ` Vincent Whitchurch
2022-03-08 14:24 ` [PATCH v2 4/4] clocksource/drivers/exynos_mct: Enable building on ARTPEC Vincent Whitchurch
2022-03-08 14:58 ` Krzysztof Kozlowski
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=20220330082137.GA21079@axis.com \
--to=vincent.whitchurch@axis.com \
--cc=alim.akhtar@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@axis.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/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).