Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273046 > unrolled thread

Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting

Started byUlf Hansson <ulf.hansson@linaro.org>
First post2015-11-19 12:30 +0100
Last post2015-11-20 16:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-19 12:30 +0100
    Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting Dong Aisheng <dongas86@gmail.com> - 2015-11-19 17:40 +0100
      Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-20 16:30 +0100

#1273046 — Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting

FromUlf Hansson <ulf.hansson@linaro.org>
Date2015-11-19 12:30 +0100
SubjectRe: [PATCH 2/2] mmc: sdhci-esdhc-imx: correct the tuning-step setting
Message-ID<qwvzA-by-9@gated-at.bofh.it>
On 10 November 2015 at 10:43, Haibo Chen <haibo.chen@freescale.com> wrote:
> Here we use '|=' to set the tuning-step, but before that, we should
> clear the tuning-step, otherwise we could got the wrong setting.
>
> Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 1508949..64275c7 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -76,6 +76,7 @@
>  #define ESDHC_STD_TUNING_EN            (1 << 24)
>  /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */
>  #define ESDHC_TUNING_START_TAP         0x1
> +#define ESDHC_TUNING_STEP_MASK         0x00070000
>  #define ESDHC_TUNING_STEP_SHIFT                16
>
>  /* pinctrl state */
> @@ -489,9 +490,11 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
>                                 m |= ESDHC_MIX_CTRL_FBCLK_SEL;
>                                 tuning_ctrl = readl(host->ioaddr + ESDHC_TUNING_CTRL);
>                                 tuning_ctrl |= ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP;
> -                               if (imx_data->boarddata.tuning_step)
> +                               if (imx_data->boarddata.tuning_step) {
> +                                       tuning_ctrl &= ~ESDHC_TUNING_STEP_MASK;
>                                         tuning_ctrl |= imx_data->boarddata.tuning_step << ESDHC_TUNING_STEP_SHIFT;
> -                                       writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
> +                               }
> +                               writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
>                         } else {
>                                 v &= ~ESDHC_MIX_CTRL_EXE_TUNE;
>                         }
> --
> 1.9.1
>

Looks good to me, but is there a dependency to patch 1/2 that should
prevent me from applying this one?

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1273277

FromDong Aisheng <dongas86@gmail.com>
Date2015-11-19 17:40 +0100
Message-ID<qwApA-3ke-9@gated-at.bofh.it>
In reply to#1273046
Hi Ulf,

On Thu, Nov 19, 2015 at 7:20 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 10 November 2015 at 10:43, Haibo Chen <haibo.chen@freescale.com> wrote:
>> Here we use '|=' to set the tuning-step, but before that, we should
>> clear the tuning-step, otherwise we could got the wrong setting.
>>
>> Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
>> ---
>>  drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> index 1508949..64275c7 100644
>> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> @@ -76,6 +76,7 @@
>>  #define ESDHC_STD_TUNING_EN            (1 << 24)
>>  /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */
>>  #define ESDHC_TUNING_START_TAP         0x1
>> +#define ESDHC_TUNING_STEP_MASK         0x00070000
>>  #define ESDHC_TUNING_STEP_SHIFT                16
>>
>>  /* pinctrl state */
>> @@ -489,9 +490,11 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
>>                                 m |= ESDHC_MIX_CTRL_FBCLK_SEL;
>>                                 tuning_ctrl = readl(host->ioaddr + ESDHC_TUNING_CTRL);
>>                                 tuning_ctrl |= ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP;
>> -                               if (imx_data->boarddata.tuning_step)
>> +                               if (imx_data->boarddata.tuning_step) {
>> +                                       tuning_ctrl &= ~ESDHC_TUNING_STEP_MASK;
>>                                         tuning_ctrl |= imx_data->boarddata.tuning_step << ESDHC_TUNING_STEP_SHIFT;
>> -                                       writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
>> +                               }
>> +                               writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
>>                         } else {
>>                                 v &= ~ESDHC_MIX_CTRL_EXE_TUNE;
>>                         }
>> --
>> 1.9.1
>>
>
> Looks good to me, but is there a dependency to patch 1/2 that should
> prevent me from applying this one?
>

No dependency.
Acked-by: Dong Aisheng <aisheng.dong@freescale.com>

Regards
Dong Aisheng

> Kind regards
> Uffe
> --
> 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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1274180

FromUlf Hansson <ulf.hansson@linaro.org>
Date2015-11-20 16:30 +0100
Message-ID<qwVNo-xS-19@gated-at.bofh.it>
In reply to#1273277
On 19 November 2015 at 17:34, Dong Aisheng <dongas86@gmail.com> wrote:
> Hi Ulf,
>
> On Thu, Nov 19, 2015 at 7:20 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 10 November 2015 at 10:43, Haibo Chen <haibo.chen@freescale.com> wrote:
>>> Here we use '|=' to set the tuning-step, but before that, we should
>>> clear the tuning-step, otherwise we could got the wrong setting.
>>>
>>> Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
>>> ---
>>>  drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++++--
>>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>>> index 1508949..64275c7 100644
>>> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>>> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>>> @@ -76,6 +76,7 @@
>>>  #define ESDHC_STD_TUNING_EN            (1 << 24)
>>>  /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */
>>>  #define ESDHC_TUNING_START_TAP         0x1
>>> +#define ESDHC_TUNING_STEP_MASK         0x00070000
>>>  #define ESDHC_TUNING_STEP_SHIFT                16
>>>
>>>  /* pinctrl state */
>>> @@ -489,9 +490,11 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
>>>                                 m |= ESDHC_MIX_CTRL_FBCLK_SEL;
>>>                                 tuning_ctrl = readl(host->ioaddr + ESDHC_TUNING_CTRL);
>>>                                 tuning_ctrl |= ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP;
>>> -                               if (imx_data->boarddata.tuning_step)
>>> +                               if (imx_data->boarddata.tuning_step) {
>>> +                                       tuning_ctrl &= ~ESDHC_TUNING_STEP_MASK;
>>>                                         tuning_ctrl |= imx_data->boarddata.tuning_step << ESDHC_TUNING_STEP_SHIFT;
>>> -                                       writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
>>> +                               }
>>> +                               writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
>>>                         } else {
>>>                                 v &= ~ESDHC_MIX_CTRL_EXE_TUNE;
>>>                         }
>>> --
>>> 1.9.1
>>>
>>
>> Looks good to me, but is there a dependency to patch 1/2 that should
>> prevent me from applying this one?
>>
>
> No dependency.
> Acked-by: Dong Aisheng <aisheng.dong@freescale.com>
>

Okay. I have applied it for next, thanks!

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web