diff mbox

[1/4] clocksource: armada-370-xp: Add missing clock enable

Message ID 1413984884-20273-2-git-send-email-ezequiel.garcia@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia Oct. 22, 2014, 1:34 p.m. UTC
This commit makes sure the timer clock is prepared and enabled
before retrieving its rate.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/clocksource/time-armada-370-xp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Petazzoni Oct. 22, 2014, 1:50 p.m. UTC | #1
Dear Ezequiel Garcia,

On Wed, 22 Oct 2014 10:34:41 -0300, Ezequiel Garcia wrote:
> This commit makes sure the timer clock is prepared and enabled
> before retrieving its rate.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
>  drivers/clocksource/time-armada-370-xp.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Gregory CLEMENT Oct. 22, 2014, 2:37 p.m. UTC | #2
Hi Ezequiel,

On 22/10/2014 15:34, Ezequiel Garcia wrote:
> This commit makes sure the timer clock is prepared and enabled
> before retrieving its rate.

Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>


Thanks,

Gregory

> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
>  drivers/clocksource/time-armada-370-xp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
> index 0451e62..d8555f9 100644
> --- a/drivers/clocksource/time-armada-370-xp.c
> +++ b/drivers/clocksource/time-armada-370-xp.c
> @@ -293,6 +293,7 @@ static void __init armada_xp_timer_init(struct device_node *np)
>  
>  	/* The 25Mhz fixed clock is mandatory, and must always be available */
>  	BUG_ON(IS_ERR(clk));
> +	clk_prepare_enable(clk);
>  	timer_clk = clk_get_rate(clk);
>  
>  	armada_370_xp_timer_common_init(np);
> @@ -305,6 +306,7 @@ static void __init armada_370_timer_init(struct device_node *np)
>  	struct clk *clk = of_clk_get(np, 0);
>  
>  	BUG_ON(IS_ERR(clk));
> +	clk_prepare_enable(clk);
>  	timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
>  	timer25Mhz = false;
>  
>
diff mbox

Patch

diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 0451e62..d8555f9 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -293,6 +293,7 @@  static void __init armada_xp_timer_init(struct device_node *np)
 
 	/* The 25Mhz fixed clock is mandatory, and must always be available */
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk);
 
 	armada_370_xp_timer_common_init(np);
@@ -305,6 +306,7 @@  static void __init armada_370_timer_init(struct device_node *np)
 	struct clk *clk = of_clk_get(np, 0);
 
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
 	timer25Mhz = false;