diff mbox series

[V1] mmc: sdhci-msm: Clear tuning done flag while hs400 tuning

Message ID 1590678838-18099-1-git-send-email-vbadigan@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series [V1] mmc: sdhci-msm: Clear tuning done flag while hs400 tuning | expand

Commit Message

Veerabhadrarao Badiganti May 28, 2020, 3:13 p.m. UTC
Clear tuning_done flag while executing tuning to ensure vendor
specific HS400 settings are applied properly when the controller
is re-initialized in HS400 mode.

Without this, re-initialization of the qcom SDHC in HS400 mode fails
while resuming the driver from runtime-suspend or system-suspend.

Fixes: ff06ce4 ("mmc: sdhci-msm: Add HS400 platform support")
Cc: stable@vger.kernel.org
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
---
 drivers/mmc/host/sdhci-msm.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ulf Hansson May 29, 2020, 10:35 a.m. UTC | #1
On Thu, 28 May 2020 at 17:14, Veerabhadrarao Badiganti
<vbadigan@codeaurora.org> wrote:
>
> Clear tuning_done flag while executing tuning to ensure vendor
> specific HS400 settings are applied properly when the controller
> is re-initialized in HS400 mode.
>
> Without this, re-initialization of the qcom SDHC in HS400 mode fails
> while resuming the driver from runtime-suspend or system-suspend.
>
> Fixes: ff06ce4 ("mmc: sdhci-msm: Add HS400 platform support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-msm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 95cd973..b277dd7 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1174,6 +1174,12 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
>         msm_host->use_cdr = true;
>
>         /*
> +        * Clear tuning_done flag before tuning to ensure proper
> +        * HS400 settings.
> +        */
> +       msm_host->tuning_done = 0;
> +
> +       /*
>          * For HS400 tuning in HS200 timing requires:
>          * - select MCLK/2 in VENDOR_SPEC
>          * - program MCLK to 400MHz (or nearest supported) in GCC
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
>
Veerabhadrarao Badiganti May 29, 2020, 1:41 p.m. UTC | #2
On 5/29/2020 4:05 PM, Ulf Hansson wrote:
> On Thu, 28 May 2020 at 17:14, Veerabhadrarao Badiganti
> <vbadigan@codeaurora.org> wrote:
>> Clear tuning_done flag while executing tuning to ensure vendor
>> specific HS400 settings are applied properly when the controller
>> is re-initialized in HS400 mode.
>>
>> Without this, re-initialization of the qcom SDHC in HS400 mode fails
>> while resuming the driver from runtime-suspend or system-suspend.
>>
>> Fixes: ff06ce4 ("mmc: sdhci-msm: Add HS400 platform support")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
> Applied for next, thanks!
>
> Kind regards
> Uffe
Thanks Ulf.
I see a mail on this patch, that SHA in the commit text should be 12 digit.
Let me know if i have to re-post this patch by correcting it.
>> ---
>>   drivers/mmc/host/sdhci-msm.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>> index 95cd973..b277dd7 100644
>> --- a/drivers/mmc/host/sdhci-msm.c
>> +++ b/drivers/mmc/host/sdhci-msm.c
>> @@ -1174,6 +1174,12 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
>>          msm_host->use_cdr = true;
>>
>>          /*
>> +        * Clear tuning_done flag before tuning to ensure proper
>> +        * HS400 settings.
>> +        */
>> +       msm_host->tuning_done = 0;
>> +
>> +       /*
>>           * For HS400 tuning in HS200 timing requires:
>>           * - select MCLK/2 in VENDOR_SPEC
>>           * - program MCLK to 400MHz (or nearest supported) in GCC
>> --
>> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
>>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 95cd973..b277dd7 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1174,6 +1174,12 @@  static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
 	msm_host->use_cdr = true;
 
 	/*
+	 * Clear tuning_done flag before tuning to ensure proper
+	 * HS400 settings.
+	 */
+	msm_host->tuning_done = 0;
+
+	/*
 	 * For HS400 tuning in HS200 timing requires:
 	 * - select MCLK/2 in VENDOR_SPEC
 	 * - program MCLK to 400MHz (or nearest supported) in GCC