public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] omap: hsmmc: fix ocr mask usage
@ 2011-06-14 10:29 Sourav Poddar
  2011-06-16 11:15 ` S, Venkatraman
  2011-06-19  3:18 ` Chris Ball
  0 siblings, 2 replies; 3+ messages in thread
From: Sourav Poddar @ 2011-06-14 10:29 UTC (permalink / raw)
  To: linux-mmc; +Cc: tony, madhu.cr, kishore.kadiyala, cjb, gadiyar, Sourav Poddar

From: Anand Gadiyar <gadiyar@ti.com>

The OMAP HSMMC driver uses an ocr_mask to determine the
list of voltages supported by the card. It populates this
mask based on the list of voltages supported by the
regulator that supplies the voltage.

Commit 64be97822b (omap4 hsmmc: Update ocr mask for MMC2 for
regulator to use) passed a fixed ocr_mask from the OMAP4 SDP
board file to limit the voltage to 2.9-3.0 Volts, and updated
the driver to use this mask if provided, instead of using the
regulator's supported voltages.

However the commit is buggy - the ocr_mask is overridden
by the regulator's capabilities anyway. Fix this.

(The bug shows up when a system-wide suspend is attempted
on the OMAP4 SDP/Blaze platforms. The eMMC card comes up
at 3V, but drops to 1.65V after the system resumes).

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Balaji T K <balajitk@ti.com>
Tested-by:  Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
 v2: Rebase to latest kernel(Linux 3.0-rc3)
 v1: https://patchwork.kernel.org/patch/576871/

 drivers/mmc/host/omap_hsmmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 5b2e215..8707bcd 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -429,7 +429,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 				return -EINVAL;
 			}
 		}
-		mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
 
 		/* Allow an aux regulator */
 		reg = regulator_get(host->dev, "vmmc_aux");
-- 
1.7.0.4


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

* Re: [PATCH v2] omap: hsmmc: fix ocr mask usage
  2011-06-14 10:29 [PATCH v2] omap: hsmmc: fix ocr mask usage Sourav Poddar
@ 2011-06-16 11:15 ` S, Venkatraman
  2011-06-19  3:18 ` Chris Ball
  1 sibling, 0 replies; 3+ messages in thread
From: S, Venkatraman @ 2011-06-16 11:15 UTC (permalink / raw)
  To: Sourav Poddar; +Cc: linux-mmc, tony, madhu.cr, kishore.kadiyala, cjb, gadiyar

On Tue, Jun 14, 2011 at 3:59 PM, Sourav Poddar <sourav.poddar@ti.com> wrote:
> From: Anand Gadiyar <gadiyar@ti.com>
>
> The OMAP HSMMC driver uses an ocr_mask to determine the
> list of voltages supported by the card. It populates this
> mask based on the list of voltages supported by the
> regulator that supplies the voltage.
>
> Commit 64be97822b (omap4 hsmmc: Update ocr mask for MMC2 for
> regulator to use) passed a fixed ocr_mask from the OMAP4 SDP
> board file to limit the voltage to 2.9-3.0 Volts, and updated
> the driver to use this mask if provided, instead of using the
> regulator's supported voltages.
>
> However the commit is buggy - the ocr_mask is overridden
> by the regulator's capabilities anyway. Fix this.
>
> (The bug shows up when a system-wide suspend is attempted
> on the OMAP4 SDP/Blaze platforms. The eMMC card comes up
> at 3V, but drops to 1.65V after the system resumes).
>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Acked-by: Balaji T K <balajitk@ti.com>
> Tested-by:  Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> ---
>  v2: Rebase to latest kernel(Linux 3.0-rc3)
>  v1: https://patchwork.kernel.org/patch/576871/
>
>  drivers/mmc/host/omap_hsmmc.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 5b2e215..8707bcd 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -429,7 +429,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
>                                return -EINVAL;
>                        }
>                }
> -               mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
>
>                /* Allow an aux regulator */
>                reg = regulator_get(host->dev, "vmmc_aux");
> --
Acked-by: Venkatraman S <svenkatr@ti.com>

Hi Chris,
  Can you please queue it for the next rc ?
Thanks and regards,
Venkat.

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

* Re: [PATCH v2] omap: hsmmc: fix ocr mask usage
  2011-06-14 10:29 [PATCH v2] omap: hsmmc: fix ocr mask usage Sourav Poddar
  2011-06-16 11:15 ` S, Venkatraman
@ 2011-06-19  3:18 ` Chris Ball
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Ball @ 2011-06-19  3:18 UTC (permalink / raw)
  To: Sourav Poddar; +Cc: linux-mmc, tony, madhu.cr, kishore.kadiyala, gadiyar

Hi,

On Tue, Jun 14 2011, Sourav Poddar wrote:
> From: Anand Gadiyar <gadiyar@ti.com>
>
> The OMAP HSMMC driver uses an ocr_mask to determine the
> list of voltages supported by the card. It populates this
> mask based on the list of voltages supported by the
> regulator that supplies the voltage.
>
> Commit 64be97822b (omap4 hsmmc: Update ocr mask for MMC2 for
> regulator to use) passed a fixed ocr_mask from the OMAP4 SDP
> board file to limit the voltage to 2.9-3.0 Volts, and updated
> the driver to use this mask if provided, instead of using the
> regulator's supported voltages.
>
> However the commit is buggy - the ocr_mask is overridden
> by the regulator's capabilities anyway. Fix this.
>
> (The bug shows up when a system-wide suspend is attempted
> on the OMAP4 SDP/Blaze platforms. The eMMC card comes up
> at 3V, but drops to 1.65V after the system resumes).
>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Acked-by: Balaji T K <balajitk@ti.com>
> Tested-by:  Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>

Pushed to mmc-next for 3.0-rc with Venkat's ACK, thanks.

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

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

end of thread, other threads:[~2011-06-19  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 10:29 [PATCH v2] omap: hsmmc: fix ocr mask usage Sourav Poddar
2011-06-16 11:15 ` S, Venkatraman
2011-06-19  3:18 ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox