linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare
       [not found] <1337987696-31728-1-git-send-email-festevam@gmail.com>
@ 2012-05-25 23:14 ` Fabio Estevam
  2012-05-29  9:17   ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2012-05-25 23:14 UTC (permalink / raw)
  To: kernel; +Cc: shawn.guo, Fabio Estevam, Jeff Garzik, linux-ide

From: Fabio Estevam <fabio.estevam@freescale.com>

Prepare the clock before enabling it.

Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: <linux-ide@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/ata/pata_imx.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index c5af97f..87bb05b 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -118,7 +118,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->clk);
 	}
 
-	clk_enable(priv->clk);
+	clk_prepare_enable(priv->clk);
 
 	host = ata_host_alloc(&pdev->dev, 1);
 	if (!host)
@@ -162,7 +162,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev)
 				&pata_imx_sht);
 
 free_priv:
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 	clk_put(priv->clk);
 	return -ENOMEM;
 }
@@ -176,7 +176,7 @@ static int __devexit pata_imx_remove(struct platform_device *pdev)
 
 	__raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
 
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 	clk_put(priv->clk);
 
 	return 0;
@@ -194,7 +194,7 @@ static int pata_imx_suspend(struct device *dev)
 		__raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
 		priv->ata_ctl =
 			__raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL);
-		clk_disable(priv->clk);
+		clk_disable_unprepare(priv->clk);
 	}
 
 	return ret;
@@ -205,7 +205,7 @@ static int pata_imx_resume(struct device *dev)
 	struct ata_host *host = dev_get_drvdata(dev);
 	struct pata_imx_priv *priv = host->private_data;
 
-	clk_enable(priv->clk);
+	clk_prepare_enable(priv->clk);
 
 	__raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
 
-- 
1.7.1


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

* Re: [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare
  2012-05-25 23:14 ` [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare Fabio Estevam
@ 2012-05-29  9:17   ` Sascha Hauer
  2012-06-06  3:40     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2012-05-29  9:17 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: kernel, shawn.guo, Fabio Estevam, Jeff Garzik, linux-ide

On Fri, May 25, 2012 at 08:14:43PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Prepare the clock before enabling it.
> 
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: <linux-ide@vger.kernel.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>


> ---
>  drivers/ata/pata_imx.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
> index c5af97f..87bb05b 100644
> --- a/drivers/ata/pata_imx.c
> +++ b/drivers/ata/pata_imx.c
> @@ -118,7 +118,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev)
>  		return PTR_ERR(priv->clk);
>  	}
>  
> -	clk_enable(priv->clk);
> +	clk_prepare_enable(priv->clk);
>  
>  	host = ata_host_alloc(&pdev->dev, 1);
>  	if (!host)
> @@ -162,7 +162,7 @@ static int __devinit pata_imx_probe(struct platform_device *pdev)
>  				&pata_imx_sht);
>  
>  free_priv:
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  	clk_put(priv->clk);
>  	return -ENOMEM;
>  }
> @@ -176,7 +176,7 @@ static int __devexit pata_imx_remove(struct platform_device *pdev)
>  
>  	__raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
>  
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  	clk_put(priv->clk);
>  
>  	return 0;
> @@ -194,7 +194,7 @@ static int pata_imx_suspend(struct device *dev)
>  		__raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
>  		priv->ata_ctl =
>  			__raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL);
> -		clk_disable(priv->clk);
> +		clk_disable_unprepare(priv->clk);
>  	}
>  
>  	return ret;
> @@ -205,7 +205,7 @@ static int pata_imx_resume(struct device *dev)
>  	struct ata_host *host = dev_get_drvdata(dev);
>  	struct pata_imx_priv *priv = host->private_data;
>  
> -	clk_enable(priv->clk);
> +	clk_prepare_enable(priv->clk);
>  
>  	__raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
>  
> -- 
> 1.7.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare
  2012-05-29  9:17   ` Sascha Hauer
@ 2012-06-06  3:40     ` Fabio Estevam
  2012-06-08 15:49       ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2012-06-06  3:40 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: kernel, shawn.guo, Fabio Estevam, Jeff Garzik, linux-ide

Jeff,

On Tue, May 29, 2012 at 6:17 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Fri, May 25, 2012 at 08:14:43PM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Prepare the clock before enabling it.
>>
>> Cc: Jeff Garzik <jgarzik@pobox.com>
>> Cc: <linux-ide@vger.kernel.org>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Can this be applied?

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

* Re: [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare
  2012-06-06  3:40     ` Fabio Estevam
@ 2012-06-08 15:49       ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2012-06-08 15:49 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Sascha Hauer, kernel, shawn.guo, Fabio Estevam, linux-ide

On 06/05/2012 11:40 PM, Fabio Estevam wrote:
> Jeff,
>
> On Tue, May 29, 2012 at 6:17 AM, Sascha Hauer<s.hauer@pengutronix.de>  wrote:
>> On Fri, May 25, 2012 at 08:14:43PM -0300, Fabio Estevam wrote:
>>> From: Fabio Estevam<fabio.estevam@freescale.com>
>>>
>>> Prepare the clock before enabling it.
>>>
>>> Cc: Jeff Garzik<jgarzik@pobox.com>
>>> Cc:<linux-ide@vger.kernel.org>
>>> Signed-off-by: Fabio Estevam<fabio.estevam@freescale.com>
>>
>> Acked-by: Sascha Hauer<s.hauer@pengutronix.de>
>
> Can this be applied?

Just got back from Europe, and will get this in ASAP...




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

end of thread, other threads:[~2012-06-08 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1337987696-31728-1-git-send-email-festevam@gmail.com>
2012-05-25 23:14 ` [PATCH 02/15] ata: Use clk_prepare_enable/clk_disable_unprepare Fabio Estevam
2012-05-29  9:17   ` Sascha Hauer
2012-06-06  3:40     ` Fabio Estevam
2012-06-08 15:49       ` Jeff Garzik

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