All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: sh_mmcif: support aggressive clock gating
Date: Fri, 25 Feb 2011 17:30:05 +0000	[thread overview]
Message-ID: <20110225173005.GA25051@void.printf.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1102251657290.26361@axis700.grange>

Hi Guennadi,

On Fri, Feb 25, 2011 at 04:58:38PM +0100, Guennadi Liakhovetski wrote:
> To support MMC aggressive clock gating the driver has to stop the interface
> clock, when the .set_ios() method is called with .clock == 0.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> Tested on ap4evb and ecovec
> 
>  drivers/mmc/host/sh_mmcif.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 12884c2..3d735da 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -850,15 +850,15 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	struct sh_mmcif_host *host = mmc_priv(mmc);
>  	struct sh_mmcif_plat_data *p = host->pd->dev.platform_data;
>  
> -	if (ios->power_mode == MMC_POWER_OFF) {
> +	if (ios->power_mode == MMC_POWER_UP) {
> +		if (p->set_pwr)
> +			p->set_pwr(host->pd, ios->power_mode);
> +	} else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
>  		/* clock stop */
>  		sh_mmcif_clock_control(host, 0);
> -		if (p->down_pwr)
> +		if (ios->power_mode == MMC_POWER_OFF && p->down_pwr)
>  			p->down_pwr(host->pd);
>  		return;
> -	} else if (ios->power_mode == MMC_POWER_UP) {
> -		if (p->set_pwr)
> -			p->set_pwr(host->pd, ios->power_mode);
>  	}
>  
>  	if (ios->clock)

Thanks, pushed to mmc-next for .39.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

WARNING: multiple messages have this Message-ID (diff)
From: Chris Ball <cjb@laptop.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: sh_mmcif: support aggressive clock gating
Date: Fri, 25 Feb 2011 17:30:05 +0000	[thread overview]
Message-ID: <20110225173005.GA25051@void.printf.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1102251657290.26361@axis700.grange>

Hi Guennadi,

On Fri, Feb 25, 2011 at 04:58:38PM +0100, Guennadi Liakhovetski wrote:
> To support MMC aggressive clock gating the driver has to stop the interface
> clock, when the .set_ios() method is called with .clock = 0.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> Tested on ap4evb and ecovec
> 
>  drivers/mmc/host/sh_mmcif.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 12884c2..3d735da 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -850,15 +850,15 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	struct sh_mmcif_host *host = mmc_priv(mmc);
>  	struct sh_mmcif_plat_data *p = host->pd->dev.platform_data;
>  
> -	if (ios->power_mode = MMC_POWER_OFF) {
> +	if (ios->power_mode = MMC_POWER_UP) {
> +		if (p->set_pwr)
> +			p->set_pwr(host->pd, ios->power_mode);
> +	} else if (ios->power_mode = MMC_POWER_OFF || !ios->clock) {
>  		/* clock stop */
>  		sh_mmcif_clock_control(host, 0);
> -		if (p->down_pwr)
> +		if (ios->power_mode = MMC_POWER_OFF && p->down_pwr)
>  			p->down_pwr(host->pd);
>  		return;
> -	} else if (ios->power_mode = MMC_POWER_UP) {
> -		if (p->set_pwr)
> -			p->set_pwr(host->pd, ios->power_mode);
>  	}
>  
>  	if (ios->clock)

Thanks, pushed to mmc-next for .39.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-02-25 17:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 15:58 [PATCH] mmc: sh_mmcif: support aggressive clock gating Guennadi Liakhovetski
2011-02-25 15:58 ` Guennadi Liakhovetski
2011-02-25 17:30 ` Chris Ball [this message]
2011-02-25 17:30   ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110225173005.GA25051@void.printf.net \
    --to=cjb@laptop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.