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

login
register
mail settings
Submitter Fabio Estevam
Date May 25, 2012, 11:14 p.m.
Message ID <1337987696-31728-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/161438/
State New
Headers show

Comments

Fabio Estevam - May 25, 2012, 11:14 p.m.
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(-)
Sascha Hauer - May 26, 2012, 11:28 a.m.
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

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);
 }
 
 /*