linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference
@ 2016-08-10 13:14 Gregory CLEMENT
  2016-08-15  5:31 ` Stefan Roese
  2016-08-16  9:56 ` Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Gregory CLEMENT @ 2016-08-10 13:14 UTC (permalink / raw)
  To: linux-arm-kernel

While converting the init function to return an error, the wrong clock
was get. This lead to wrong clock rate and slow down the kernel. For
example, before the patch a typical boot was around 15s after it was 1
minute slower.

Fixes: 12549e27c63c ("clocksource/drivers/time-armada-370-xp: Convert init function to return error")

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
Changelog:

v1 -> v2
Move the of_clk_get_by_name out of the declaration as sugested by
Thomas Petazzoni.

 drivers/clocksource/time-armada-370-xp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 719b478d136e..376ed13fe739 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -335,10 +335,10 @@ static int __init armada_370_xp_timer_common_init(struct device_node *np)
 
 static int __init armada_xp_timer_init(struct device_node *np)
 {
-	struct clk *clk = of_clk_get_by_name(np, "fixed");
+	struct clk *clk;
 	int ret;
 
-	clk = of_clk_get(np, 0);
+	clk = of_clk_get_by_name(np, "fixed");
 	if (IS_ERR(clk)) {
 		pr_err("Failed to get clock");
 		return PTR_ERR(clk);
-- 
2.8.1

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

* [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference
  2016-08-10 13:14 [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference Gregory CLEMENT
@ 2016-08-15  5:31 ` Stefan Roese
  2016-08-16  9:56 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2016-08-15  5:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 10.08.2016 15:14, Gregory CLEMENT wrote:
> While converting the init function to return an error, the wrong clock
> was get. This lead to wrong clock rate and slow down the kernel. For
> example, before the patch a typical boot was around 15s after it was 1
> minute slower.
>
> Fixes: 12549e27c63c ("clocksource/drivers/time-armada-370-xp: Convert init function to return error")
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Tested-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference
  2016-08-10 13:14 [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference Gregory CLEMENT
  2016-08-15  5:31 ` Stefan Roese
@ 2016-08-16  9:56 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2016-08-16  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/10/2016 03:14 PM, Gregory CLEMENT wrote:
> While converting the init function to return an error, the wrong clock
> was get. This lead to wrong clock rate and slow down the kernel. For
> example, before the patch a typical boot was around 15s after it was 1
> minute slower.
> 
> Fixes: 12549e27c63c ("clocksource/drivers/time-armada-370-xp: Convert init function to return error")
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---

Applied.

Thanks Clement !

  -- Daniel

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

end of thread, other threads:[~2016-08-16  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 13:14 [PATCH v2] clocksource/drivers/time-armada-370-xp: Fix the clock reference Gregory CLEMENT
2016-08-15  5:31 ` Stefan Roese
2016-08-16  9:56 ` Daniel Lezcano

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