From: Dmitry Osipenko <digetx@gmail.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Joseph Lo <josephl@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/7] clocksource/drivers/tegra: Reset hardware state on init
Date: Sun, 5 May 2019 19:24:32 +0300 [thread overview]
Message-ID: <20190505162436.23125-4-digetx@gmail.com> (raw)
In-Reply-To: <20190505162436.23125-1-digetx@gmail.com>
Reset timer's hardware state to ensure that initially it is in a
predictable state.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/clocksource/timer-tegra20.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clocksource/timer-tegra20.c b/drivers/clocksource/timer-tegra20.c
index 42a19a4019a9..b7d1e6221348 100644
--- a/drivers/clocksource/timer-tegra20.c
+++ b/drivers/clocksource/timer-tegra20.c
@@ -132,6 +132,9 @@ static int tegra_timer_setup(unsigned int cpu)
{
struct timer_of *to = per_cpu_ptr(&tegra_to, cpu);
+ writel(0, timer_of_base(to) + TIMER_PTV);
+ writel(TIMER_PCR_INTR_CLR, timer_of_base(to) + TIMER_PCR);
+
irq_force_affinity(to->clkevt.irq, cpumask_of(cpu));
enable_irq(to->clkevt.irq);
--
2.21.0
next prev parent reply other threads:[~2019-05-05 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-05 16:24 [PATCH v2 0/7] NVIDIA Tegra clocksource improvements and clean up Dmitry Osipenko
2019-05-05 16:24 ` [PATCH v2 1/7] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's Dmitry Osipenko
2019-05-05 16:24 ` [PATCH v2 2/7] clocksource/drivers/tegra: Unify timer code Dmitry Osipenko
2019-05-05 16:24 ` Dmitry Osipenko [this message]
2019-05-05 16:24 ` [PATCH v2 4/7] clocksource/drivers/tegra: Replace readl/writel with relaxed versions Dmitry Osipenko
2019-05-05 16:24 ` [PATCH v2 5/7] clocksource/drivers/tegra: Release all IRQ's on request_irq() error Dmitry Osipenko
2019-05-05 16:24 ` [PATCH v2 6/7] clocksource/drivers/tegra: Minor code clean up Dmitry Osipenko
2019-05-05 16:24 ` [PATCH v2 7/7] clocksource/drivers/tegra: Use SPDX identifier Dmitry Osipenko
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=20190505162436.23125-4-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=josephl@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
/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).