diff mbox

omap: hsmmc: fix ocr mask usage

Message ID 1298268437-17989-1-git-send-email-gadiyar@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anand Gadiyar Feb. 21, 2011, 6:07 a.m. UTC
None

Comments

Balaji T K May 26, 2011, 10:45 a.m. UTC | #1
On Mon, Feb 21, 2011 at 9:40 PM, Kishore Kadiyala
<kishorek.kadiyala@gmail.com> wrote:
> On Mon, Feb 21, 2011 at 11:37 AM, Anand Gadiyar <gadiyar@ti.com> wrote:
>> 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>
>
> Tested this patch on OMAP4430SDP & OMAP4 Blaze.
>
> Tested-by:  Kishore Kadiyala <kishore.kadiyala@ti.com>
>
Acked-by: Balaji T K <balajitk@ti.com>

Can you this patch be queued?

>> Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> ---
>> Tony, Chris,
>>
>> This is only a partial fix. It fixes the obvious bug introduced
>> in the commit I noted above, however it is not the final
>> fix. I'm not convinced the way the regulators are handled
>> in this driver is correct - I'm still studying the code and
>> will come up with a proper fix later.
>>
>> However, this does fix a real bug and I believe the bug is
>> obvious. Would be nice to get this into the -rc series if
>> we still can.
>>
>> - Anand
>>
>>  drivers/mmc/host/omap_hsmmc.c |    1 -
>>  1 file changed, 1 deletion(-)
>>
>> Index: linux-2.6/drivers/mmc/host/omap_hsmmc.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/mmc/host/omap_hsmmc.c
>> +++ linux-2.6/drivers/mmc/host/omap_hsmmc.c
>> @@ -413,7 +413,6 @@ static int omap_hsmmc_reg_get(struct oma
>>                                return -EINVAL;
>>                        }
>>                }
>> -               mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
>>
>>                /* Allow an aux regulator */
>>                reg = regulator_get(host->dev, "vmmc_aux");
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-2.6/drivers/mmc/host/omap_hsmmc.c
===================================================================
--- linux-2.6.orig/drivers/mmc/host/omap_hsmmc.c
+++ linux-2.6/drivers/mmc/host/omap_hsmmc.c
@@ -413,7 +413,6 @@  static int omap_hsmmc_reg_get(struct oma
 				return -EINVAL;
 			}
 		}
-		mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
 
 		/* Allow an aux regulator */
 		reg = regulator_get(host->dev, "vmmc_aux");