From: Dmitry Osipenko Date: Mon, 3 Jun 2019 18:59:41 +0000 (+0300) Subject: clocksource/drivers/tegra: Reset hardware state on init X-Git-Tag: v5.3-rc1~211^2~6^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77d57d1d8016696daaf5614c070ac01c9652f4ce;p=thirdparty%2Fkernel%2Flinux.git clocksource/drivers/tegra: Reset hardware state on init Reset timer's hardware state to ensure that initially it is in a predictable state. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano --- diff --git a/drivers/clocksource/timer-tegra20.c b/drivers/clocksource/timer-tegra20.c index acd68c77fa910..3e4f12aee8df1 100644 --- a/drivers/clocksource/timer-tegra20.c +++ b/drivers/clocksource/timer-tegra20.c @@ -123,6 +123,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);