diff mbox

[08/12] mmc: sh_mobile_sdhi: Convert to clk_prepare/unprepare

Message ID 1383000569-8916-9-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Pinchart Oct. 28, 2013, 10:49 p.m. UTC
Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common
clock framework.

Cc: Chris Ball <cjb@laptop.org>
Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Cc: linux-mmc@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Guennadi Liakhovetski Oct. 29, 2013, 8:09 a.m. UTC | #1
On Mon, 28 Oct 2013, Laurent Pinchart wrote:

> Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
> clk_disable_unprepare() to get ready for the migration to the common
> clock framework.
> 
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> Cc: linux-mmc@vger.kernel.org
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Thanks
Guennadi

> ---
>  drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> index f344659..ed1718a 100644
> --- a/drivers/mmc/host/sh_mobile_sdhi.c
> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int
>  	struct mmc_host *mmc = platform_get_drvdata(pdev);
>  	struct tmio_mmc_host *host = mmc_priv(mmc);
>  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
> -	int ret = clk_enable(priv->clk);
> +	int ret = clk_prepare_enable(priv->clk);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev)
>  	struct mmc_host *mmc = platform_get_drvdata(pdev);
>  	struct tmio_mmc_host *host = mmc_priv(mmc);
>  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  }
>  
>  static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
> -- 
> 1.8.1.5
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Laurent Pinchart Nov. 9, 2013, 12:56 p.m. UTC | #2
Hi Chris,

Could you please pick this patch up ?

On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
> On Mon, 28 Oct 2013, Laurent Pinchart wrote:
> > Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
> > clk_disable_unprepare() to get ready for the migration to the common
> > clock framework.
> > 
> > Cc: Chris Ball <cjb@laptop.org>
> > Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> > Cc: linux-mmc@vger.kernel.org
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> 
> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> Thanks
> Guennadi
> 
> > ---
> > 
> >  drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c
> > b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644
> > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > @@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct
> > platform_device *pdev, unsigned int> 
> >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> >  	sh_mobile_sdhi, mmc_data);> 
> > -	int ret = clk_enable(priv->clk);
> > +	int ret = clk_prepare_enable(priv->clk);
> > 
> >  	if (ret < 0)
> >  	
> >  		return ret;
> > 
> > @@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct
> > platform_device *pdev)> 
> >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> >  	sh_mobile_sdhi, mmc_data);> 
> > -	clk_disable(priv->clk);
> > +	clk_disable_unprepare(priv->clk);
> > 
> >  }
> >  
> >  static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Laurent Pinchart Nov. 26, 2013, 2:02 a.m. UTC | #3
Hi Chris,

On Saturday 09 November 2013 13:56:40 Laurent Pinchart wrote:
> Hi Chris,
> 
> Could you please pick this patch up ?

Ping ?

As this patch is a dependency for other series that will go through different 
trees, could you please provide a stable branch in your tree with this patch 
included that you will push to v3.14 ?

> On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
> > On Mon, 28 Oct 2013, Laurent Pinchart wrote:
> > > Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
> > > clk_disable_unprepare() to get ready for the migration to the common
> > > clock framework.
> > > 
> > > Cc: Chris Ball <cjb@laptop.org>
> > > Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> > > Cc: linux-mmc@vger.kernel.org
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > 
> > Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > 
> > Thanks
> > Guennadi
> > 
> > > ---
> > > 
> > >  drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c
> > > b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644
> > > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > > @@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct
> > > platform_device *pdev, unsigned int>
> > >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> > >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> > >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> > >  	sh_mobile_sdhi, mmc_data);
> > > -	int ret = clk_enable(priv->clk);
> > > +	int ret = clk_prepare_enable(priv->clk);
> > >  	if (ret < 0)
> > >  		return ret;
> > > 
> > > @@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct
> > > platform_device *pdev)>
> > >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> > >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> > >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> > >  	sh_mobile_sdhi, mmc_data);
> > > -	clk_disable(priv->clk);
> > > +	clk_disable_unprepare(priv->clk);
> > >  }
> > >  
> > >  static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Laurent Pinchart Dec. 11, 2013, 12:01 p.m. UTC | #4
Hi Chris,

On Tuesday 26 November 2013 03:02:48 Laurent Pinchart wrote:
> On Saturday 09 November 2013 13:56:40 Laurent Pinchart wrote:
> > Hi Chris,
> > 
> > Could you please pick this patch up ?
> 
> Ping ?

PING ?

> As this patch is a dependency for other series that will go through
> different trees, could you please provide a stable branch in your tree with
> this patch included that you will push to v3.14 ?
> 
> > On Tuesday 29 October 2013 09:09:37 Guennadi Liakhovetski wrote:
> > > On Mon, 28 Oct 2013, Laurent Pinchart wrote:
> > > > Turn clk_enable() and clk_disable() calls into clk_prepare_enable()
> > > > and clk_disable_unprepare() to get ready for the migration to the
> > > > common clock framework.
> > > > 
> > > > Cc: Chris Ball <cjb@laptop.org>
> > > > Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> > > > Cc: linux-mmc@vger.kernel.org
> > > > Signed-off-by: Laurent Pinchart
> > > > <laurent.pinchart+renesas@ideasonboard.com>
> > > 
> > > Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > 
> > > Thanks
> > > Guennadi
> > > 
> > > > ---
> > > > 
> > > >  drivers/mmc/host/sh_mobile_sdhi.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c
> > > > b/drivers/mmc/host/sh_mobile_sdhi.c index f344659..ed1718a 100644
> > > > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > > > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > > > @@ -54,7 +54,7 @@ static int sh_mobile_sdhi_clk_enable(struct
> > > > platform_device *pdev, unsigned int
> > > >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> > > >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> > > >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> > > >  	sh_mobile_sdhi, mmc_data);
> > > > 
> > > > -	int ret = clk_enable(priv->clk);
> > > > +	int ret = clk_prepare_enable(priv->clk);
> > > >  	if (ret < 0)
> > > >  		return ret;
> > > > 
> > > > @@ -67,7 +67,7 @@ static void sh_mobile_sdhi_clk_disable(struct
> > > > platform_device *pdev)
> > > >  	struct mmc_host *mmc = platform_get_drvdata(pdev);
> > > >  	struct tmio_mmc_host *host = mmc_priv(mmc);
> > > >  	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct
> > > >  	sh_mobile_sdhi, mmc_data);
> > > > 
> > > > -	clk_disable(priv->clk);
> > > > +	clk_disable_unprepare(priv->clk);
> > > >  }
> > > >  
> > > >  static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
Chris Ball Dec. 12, 2013, 1:29 a.m. UTC | #5
Hi Laurent,

On Wed, Dec 11 2013, Laurent Pinchart wrote:
> PING ?

I'm sorry about the delay -- it's in mmc-next for 3.14 now.

- Chris.
Laurent Pinchart Dec. 12, 2013, 2:16 a.m. UTC | #6
Hi Chris,

On Wednesday 11 December 2013 20:29:56 Chris Ball wrote:
> Hi Laurent,
> 
> On Wed, Dec 11 2013, Laurent Pinchart wrote:
> > PING ?
> 
> I'm sorry about the delay -- it's in mmc-next for 3.14 now.

Thanks a lot and sorry about shouting. Don't worry about the delay, I only 
wanted to make sure the patch would get in v3.14.

Now, if you wanted to review (and hopefully apply) the following patches as 
well that would be perfect :-)

[PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration 
code
[PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms
mmc: sdhi: Enable driver compilation with COMPILE_TEST
mmc: sh_mmcif: Enable driver compilation with COMPILE_TEST

(Please note that "[PATCH v3 3/3] mmc: sh_mmcif: Enable the driver on all ARM 
platforms" has been superseded by "mmc: sh_mmcif: Enable driver compilation 
with COMPILE_TEST")
Chris Ball Dec. 12, 2013, 2:25 a.m. UTC | #7
Hi Laurent,

On Wed, Dec 11 2013, Laurent Pinchart wrote:
>> I'm sorry about the delay -- it's in mmc-next for 3.14 now.
>
> Thanks a lot and sorry about shouting. Don't worry about the delay, I only 
> wanted to make sure the patch would get in v3.14.

No worries, it was deserved yelling.  :-)

> [PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration 
> code
> [PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms

These two are in mmc-next now too.  (I usually wait for someone with
SH hardware to ACK, but I understand that Guennadi's not around as
much anymore.)

- Chris.
Simon Horman Dec. 14, 2013, 1:05 a.m. UTC | #8
On Wed, Dec 11, 2013 at 09:25:09PM -0500, Chris Ball wrote:
> Hi Laurent,
> 
> On Wed, Dec 11 2013, Laurent Pinchart wrote:
> >> I'm sorry about the delay -- it's in mmc-next for 3.14 now.
> >
> > Thanks a lot and sorry about shouting. Don't worry about the delay, I only 
> > wanted to make sure the patch would get in v3.14.
> 
> No worries, it was deserved yelling.  :-)
> 
> > [PATCH v3 1/3] mmc: sh_mmcif: Factorize DMA channel request and configuration 
> > code
> > [PATCH v3 2/3] mmc: sh_mmcif: Fix compilation warning on 64-bit platforms
> 
> These two are in mmc-next now too.  (I usually wait for someone with
> SH hardware to ACK, but I understand that Guennadi's not around as
> much anymore.)

I believe I can provide such Acks going forwards.
diff mbox

Patch

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index f344659..ed1718a 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -54,7 +54,7 @@  static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	int ret = clk_enable(priv->clk);
+	int ret = clk_prepare_enable(priv->clk);
 	if (ret < 0)
 		return ret;
 
@@ -67,7 +67,7 @@  static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev)
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 	struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 }
 
 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)