linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] clocksource/drivers/tegra: Cycles can't be 0
@ 2019-06-16 23:47 Dmitry Osipenko
  2019-06-16 23:47 ` [PATCH v1 2/2] clocksource/drivers/tegra: Set up maximum limit properly Dmitry Osipenko
  2019-06-17  9:21 ` [PATCH v1 1/2] clocksource/drivers/tegra: Cycles can't be 0 Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Osipenko @ 2019-06-16 23:47 UTC (permalink / raw)
  To: Daniel Lezcano, Thierry Reding, Jonathan Hunter,
	Peter De Schrijver
  Cc: linux-tegra, linux-kernel

The minimum number of "cycles" is limited to 1 by
clockevents_config_and_register().

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/clocksource/timer-tegra.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-tegra.c b/drivers/clocksource/timer-tegra.c
index f6a8eb0d7322..090c85358fe8 100644
--- a/drivers/clocksource/timer-tegra.c
+++ b/drivers/clocksource/timer-tegra.c
@@ -54,9 +54,7 @@ static int tegra_timer_set_next_event(unsigned long cycles,
 {
 	void __iomem *reg_base = timer_of_base(to_timer_of(evt));
 
-	writel_relaxed(TIMER_PTV_EN |
-		       ((cycles > 1) ? (cycles - 1) : 0), /* n+1 scheme */
-		       reg_base + TIMER_PTV);
+	writel_relaxed(TIMER_PTV_EN | (cycles - 1), reg_base + TIMER_PTV);
 
 	return 0;
 }
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-17 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-16 23:47 [PATCH v1 1/2] clocksource/drivers/tegra: Cycles can't be 0 Dmitry Osipenko
2019-06-16 23:47 ` [PATCH v1 2/2] clocksource/drivers/tegra: Set up maximum limit properly Dmitry Osipenko
2019-06-17  9:21 ` [PATCH v1 1/2] clocksource/drivers/tegra: Cycles can't be 0 Thierry Reding
2019-06-17 14:41   ` Dmitry Osipenko

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).