All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
@ 2017-11-08  9:09 yinbo.zhu
  2017-11-22  8:29 ` Adrian Hunter
  2017-11-27  9:57 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: yinbo.zhu @ 2017-11-08  9:09 UTC (permalink / raw)
  To: yinbo.zhu, Adrian Hunter; +Cc: linux-mmc, yangbo.lu

From: "yinbo.zhu" <yinbo.zhu@nxp.com>

The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is
used to reset for all. The driver should make sure it's cleared before card
initialization, otherwise the initialization would fail.

Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
---
Change in v2:
		Replace ESDHC_TB_DIS with default register bit ESDHC_TB_EN

 drivers/mmc/host/sdhci-of-esdhc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index d96a057a7db8..023c24bd0d94 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -783,6 +783,10 @@ 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 related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
  2017-11-08  9:09 [PATCH v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec yinbo.zhu
@ 2017-11-22  8:29 ` Adrian Hunter
  2017-11-27  9:57 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2017-11-22  8:29 UTC (permalink / raw)
  To: yinbo.zhu; +Cc: linux-mmc, yangbo.lu

On 08/11/17 11:09, yinbo.zhu@nxp.com wrote:
> From: "yinbo.zhu" <yinbo.zhu@nxp.com>
> 
> The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is
> used to reset for all. The driver should make sure it's cleared before card
> initialization, otherwise the initialization would fail.
> 
> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> Change in v2:
> 		Replace ESDHC_TB_DIS with default register bit ESDHC_TB_EN
> 
>  drivers/mmc/host/sdhci-of-esdhc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index d96a057a7db8..023c24bd0d94 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -783,6 +783,10 @@ 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 v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
  2017-11-08  9:09 [PATCH v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec yinbo.zhu
  2017-11-22  8:29 ` Adrian Hunter
@ 2017-11-27  9:57 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-11-27  9:57 UTC (permalink / raw)
  To: yinbo.zhu; +Cc: Adrian Hunter, linux-mmc, Yangbo Lu

On 8 November 2017 at 10:09,  <yinbo.zhu@nxp.com> wrote:
> From: "yinbo.zhu" <yinbo.zhu@nxp.com>
>
> The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is
> used to reset for all. The driver should make sure it's cleared before card
> initialization, otherwise the initialization would fail.
>
> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
> Change in v2:
>                 Replace ESDHC_TB_DIS with default register bit ESDHC_TB_EN
>
>  drivers/mmc/host/sdhci-of-esdhc.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index d96a057a7db8..023c24bd0d94 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -783,6 +783,10 @@ 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
>
> --
> 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

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

end of thread, other threads:[~2017-11-27  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  9:09 [PATCH v2] mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec yinbo.zhu
2017-11-22  8:29 ` Adrian Hunter
2017-11-27  9:57 ` 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.