* RE: [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb
[not found] <20171128035706.16939-1-yinbo.zhu@nxp.com>
@ 2017-11-28 4:58 ` Y.b. Lu
2017-11-30 10:44 ` Adrian Hunter
1 sibling, 0 replies; 3+ messages in thread
From: Y.b. Lu @ 2017-11-28 4:58 UTC (permalink / raw)
To: Adrian Hunter; +Cc: Xiaobo Xie, linux-mmc, Yinbo Zhu
It makes sense.
Acked-by: Yangbo Lu <yangbo.lu@nxp.com>
> -----Original Message-----
> From: yinbo.zhu@nxp.com [mailto:yinbo.zhu@nxp.com]
> Sent: 2017年11月28日 11:57
> To: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Y.b. Lu <yangbo.lu@nxp.com>;
> linux-mmc@vger.kernel.org; Yinbo Zhu <yinbo.zhu@nxp.com>
> Subject: [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on
> ls1046ardb
>
> From: "yinbo.zhu" <yinbo.zhu@nxp.com>
>
> When system wakes up from sleep on ls1046ardb, the SD operation fails with
> mmc error messages since ESDHC_TB_EN bit couldn’t be cleaned by
> eSDHC_SYSCTL[RSTA]. It's proper to clean this bit in esdhc_reset() rather than in
> probe.
>
> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
> ---
> drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c
> b/drivers/mmc/host/sdhci-of-esdhc.c
> index ac2505a95403..5ee0d86a2f4d 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -578,10 +578,18 @@ static void esdhc_clock_enable(struct sdhci_host
> *host, bool enable)
>
> static void esdhc_reset(struct sdhci_host *host, u8 mask) {
> + u32 val;
> +
> sdhci_reset(host, mask);
>
> sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
> sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
> +
> + if (mask & SDHCI_RESET_ALL) {
> + val = sdhci_readl(host, ESDHC_TBCTL);
> + val &= ~ESDHC_TB_EN;
> + sdhci_writel(host, val, ESDHC_TBCTL);
> + }
> }
>
> /* The SCFG, Supplemental Configuration Unit, provides SoC specific @@
> -771,10 +779,6 @@ static void esdhc_init(struct platform_device *pdev, struct
> sdhci_host *host)
> pltfm_host = sdhci_priv(host);
> esdhc = sdhci_pltfm_priv(pltfm_host);
>
> - val = sdhci_readl(host, ESDHC_TBCTL);
> - val &= ~ESDHC_TB_EN;
> - sdhci_writel(host, val, ESDHC_TBCTL);
> -
> host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
> esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
> SDHCI_VENDOR_VER_SHIFT;
> --
> 2.14.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb
[not found] <20171128035706.16939-1-yinbo.zhu@nxp.com>
2017-11-28 4:58 ` [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb Y.b. Lu
@ 2017-11-30 10:44 ` Adrian Hunter
2017-11-30 13:04 ` Ulf Hansson
1 sibling, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2017-11-30 10:44 UTC (permalink / raw)
To: yinbo.zhu; +Cc: xiaobo.xie, yangbo.lu, linux-mmc, Ulf Hansson
On 28/11/17 05:57, yinbo.zhu@nxp.com wrote:
> From: "yinbo.zhu" <yinbo.zhu@nxp.com>
>
> When system wakes up from sleep on ls1046ardb, the SD operation fails
> with mmc error messages since ESDHC_TB_EN bit couldn’t be cleaned by
> eSDHC_SYSCTL[RSTA]. It's proper to clean this bit in esdhc_reset()
> rather than in probe.
>
> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index ac2505a95403..5ee0d86a2f4d 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -578,10 +578,18 @@ static void esdhc_clock_enable(struct sdhci_host *host, bool enable)
>
> static void esdhc_reset(struct sdhci_host *host, u8 mask)
> {
> + u32 val;
> +
> sdhci_reset(host, mask);
>
> sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
> sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
> +
> + if (mask & SDHCI_RESET_ALL) {
> + val = sdhci_readl(host, ESDHC_TBCTL);
> + val &= ~ESDHC_TB_EN;
> + sdhci_writel(host, val, ESDHC_TBCTL);
> + }
> }
>
> /* The SCFG, Supplemental Configuration Unit, provides SoC specific
> @@ -771,10 +779,6 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
> pltfm_host = sdhci_priv(host);
> esdhc = sdhci_pltfm_priv(pltfm_host);
>
> - val = sdhci_readl(host, ESDHC_TBCTL);
> - val &= ~ESDHC_TB_EN;
> - sdhci_writel(host, val, ESDHC_TBCTL);
> -
> host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
> esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
> SDHCI_VENDOR_VER_SHIFT;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb
2017-11-30 10:44 ` Adrian Hunter
@ 2017-11-30 13:04 ` Ulf Hansson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-11-30 13:04 UTC (permalink / raw)
To: yinbo.zhu; +Cc: Xiaobo Xie, Adrian Hunter, Yangbo Lu, linux-mmc
Hi Yinbo,
On 30 November 2017 at 11:44, Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 28/11/17 05:57, yinbo.zhu@nxp.com wrote:
>> From: "yinbo.zhu" <yinbo.zhu@nxp.com>
>>
>> When system wakes up from sleep on ls1046ardb, the SD operation fails
>> with mmc error messages since ESDHC_TB_EN bit couldn’t be cleaned by
>> eSDHC_SYSCTL[RSTA]. It's proper to clean this bit in esdhc_reset()
>> rather than in probe.
>>
>> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
This one was rejected by patchwork. Could you please sort out the
problem and re-submit it.
Kind regards
Uffe
>
>> ---
>> drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
>> index ac2505a95403..5ee0d86a2f4d 100644
>> --- a/drivers/mmc/host/sdhci-of-esdhc.c
>> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
>> @@ -578,10 +578,18 @@ static void esdhc_clock_enable(struct sdhci_host *host, bool enable)
>>
>> static void esdhc_reset(struct sdhci_host *host, u8 mask)
>> {
>> + u32 val;
>> +
>> sdhci_reset(host, mask);
>>
>> sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
>> sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
>> +
>> + if (mask & SDHCI_RESET_ALL) {
>> + val = sdhci_readl(host, ESDHC_TBCTL);
>> + val &= ~ESDHC_TB_EN;
>> + sdhci_writel(host, val, ESDHC_TBCTL);
>> + }
>> }
>>
>> /* The SCFG, Supplemental Configuration Unit, provides SoC specific
>> @@ -771,10 +779,6 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
>> pltfm_host = sdhci_priv(host);
>> esdhc = sdhci_pltfm_priv(pltfm_host);
>>
>> - val = sdhci_readl(host, ESDHC_TBCTL);
>> - val &= ~ESDHC_TB_EN;
>> - sdhci_writel(host, val, ESDHC_TBCTL);
>> -
>> host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
>> esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
>> SDHCI_VENDOR_VER_SHIFT;
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-30 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20171128035706.16939-1-yinbo.zhu@nxp.com>
2017-11-28 4:58 ` [PATCH v1] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb Y.b. Lu
2017-11-30 10:44 ` Adrian Hunter
2017-11-30 13:04 ` Ulf Hansson
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.