diff mbox

[01/15] ARM: mx5: Use clk_prepare_enable/clk_disable_unprepare

Message ID 1337987696-31728-1-git-send-email-festevam@gmail.com
State New
Headers show

Commit Message

Fabio Estevam May 25, 2012, 11:14 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Prepare the clock before enabling it.

Cc: <linux-arm-kernel@lists.infradead.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/mach-imx/mm-imx5.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Sascha Hauer May 26, 2012, 11:28 a.m. UTC | #1
On Fri, May 25, 2012 at 08:14:42PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Prepare the clock before enabling it.
> 
> Cc: <linux-arm-kernel@lists.infradead.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/mach-imx/mm-imx5.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
> index feeee17..fcad95c 100644
> --- a/arch/arm/mach-imx/mm-imx5.c
> +++ b/arch/arm/mach-imx/mm-imx5.c
> @@ -35,11 +35,11 @@ static void imx5_idle(void)
>  			return;
>  		clk_prepare(gpc_dvfs_clk);
>  	}
> -	clk_enable(gpc_dvfs_clk);
> +	clk_prepare_enable(gpc_dvfs_clk);
>  	mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
>  	if (!tzic_enable_wake())
>  		cpu_do_idle();
> -	clk_disable(gpc_dvfs_clk);
> +	clk_disable_unprepare(gpc_dvfs_clk);
>  }

No, the clock already is prepared.

Sascha
diff mbox

Patch

diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index feeee17..fcad95c 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -35,11 +35,11 @@  static void imx5_idle(void)
 			return;
 		clk_prepare(gpc_dvfs_clk);
 	}
-	clk_enable(gpc_dvfs_clk);
+	clk_prepare_enable(gpc_dvfs_clk);
 	mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
 	if (!tzic_enable_wake())
 		cpu_do_idle();
-	clk_disable(gpc_dvfs_clk);
+	clk_disable_unprepare(gpc_dvfs_clk);
 }
 
 /*