linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/timer-microchip-pit64b: set rate for gck
@ 2020-03-16  9:52 Claudiu Beznea
  2020-03-16 10:20 ` Daniel Lezcano
  2020-03-19  8:47 ` [tip: timers/core] clocksource/drivers/timer-microchip-pit64b: Fix " tip-bot2 for Claudiu Beznea
  0 siblings, 2 replies; 3+ messages in thread
From: Claudiu Beznea @ 2020-03-16  9:52 UTC (permalink / raw)
  To: daniel.lezcano, tglx; +Cc: linux-kernel, Claudiu Beznea

Generic clock rate needs to be set in case it was selected as timer clock
source in mchp_pit64b_init_mode(). Otherwise it will be enabled with wrong
rate.

Fixes: 625022a5f160 ("clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/clocksource/timer-microchip-pit64b.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/timer-microchip-pit64b.c b/drivers/clocksource/timer-microchip-pit64b.c
index bd63d3484838..59e11ca8ee73 100644
--- a/drivers/clocksource/timer-microchip-pit64b.c
+++ b/drivers/clocksource/timer-microchip-pit64b.c
@@ -264,6 +264,7 @@ static int __init mchp_pit64b_init_mode(struct mchp_pit64b_timer *timer,
 
 	if (!best_diff) {
 		timer->mode |= MCHP_PIT64B_MR_SGCLK;
+		clk_set_rate(timer->gclk, gclk_round);
 		goto done;
 	}
 
-- 
2.7.4


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

* Re: [PATCH] clocksource/drivers/timer-microchip-pit64b: set rate for gck
  2020-03-16  9:52 [PATCH] clocksource/drivers/timer-microchip-pit64b: set rate for gck Claudiu Beznea
@ 2020-03-16 10:20 ` Daniel Lezcano
  2020-03-19  8:47 ` [tip: timers/core] clocksource/drivers/timer-microchip-pit64b: Fix " tip-bot2 for Claudiu Beznea
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2020-03-16 10:20 UTC (permalink / raw)
  To: Claudiu Beznea, tglx; +Cc: linux-kernel

On 16/03/2020 10:52, Claudiu Beznea wrote:
> Generic clock rate needs to be set in case it was selected as timer clock
> source in mchp_pit64b_init_mode(). Otherwise it will be enabled with wrong
> rate.
> 
> Fixes: 625022a5f160 ("clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---

Applied, thanks




-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [tip: timers/core] clocksource/drivers/timer-microchip-pit64b: Fix rate for gck
  2020-03-16  9:52 [PATCH] clocksource/drivers/timer-microchip-pit64b: set rate for gck Claudiu Beznea
  2020-03-16 10:20 ` Daniel Lezcano
@ 2020-03-19  8:47 ` tip-bot2 for Claudiu Beznea
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Claudiu Beznea @ 2020-03-19  8:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Claudiu Beznea, Daniel Lezcano, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     0585244523f0f4de7e4480375e871617a79cab98
Gitweb:        https://git.kernel.org/tip/0585244523f0f4de7e4480375e871617a79cab98
Author:        Claudiu Beznea <claudiu.beznea@microchip.com>
AuthorDate:    Mon, 16 Mar 2020 11:52:56 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 16 Mar 2020 11:19:37 +01:00

clocksource/drivers/timer-microchip-pit64b: Fix rate for gck

Generic clock rate needs to be set in case it was selected as timer clock
source in mchp_pit64b_init_mode(). Otherwise it will be enabled with wrong
rate.

Fixes: 625022a5f160 ("clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1584352376-32585-1-git-send-email-claudiu.beznea@microchip.com
---
 drivers/clocksource/timer-microchip-pit64b.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/timer-microchip-pit64b.c b/drivers/clocksource/timer-microchip-pit64b.c
index bd63d34..59e11ca 100644
--- a/drivers/clocksource/timer-microchip-pit64b.c
+++ b/drivers/clocksource/timer-microchip-pit64b.c
@@ -264,6 +264,7 @@ static int __init mchp_pit64b_init_mode(struct mchp_pit64b_timer *timer,
 
 	if (!best_diff) {
 		timer->mode |= MCHP_PIT64B_MR_SGCLK;
+		clk_set_rate(timer->gclk, gclk_round);
 		goto done;
 	}
 

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

end of thread, other threads:[~2020-03-19  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16  9:52 [PATCH] clocksource/drivers/timer-microchip-pit64b: set rate for gck Claudiu Beznea
2020-03-16 10:20 ` Daniel Lezcano
2020-03-19  8:47 ` [tip: timers/core] clocksource/drivers/timer-microchip-pit64b: Fix " tip-bot2 for Claudiu Beznea

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