public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
To: "Benoît Thébaudeau" <benoit.thebaudeau.dev@gmail.com>
Cc: linux-mmc@vger.kernel.org,
	"Benoît Thébaudeau" <benoit@wsystem.com>,
	"Fabio Estevam" <fabio.estevam@nxp.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Chris Healy" <cphealy@gmail.com>
Subject: Re: 4.15.0-rc5 fails boot on MX53 LOCO board due to MMC (clock?) issue
Date: Fri, 12 Jan 2018 11:42:55 +0100	[thread overview]
Message-ID: <20180112104255.GA28577@amethyst.visucore.com> (raw)
In-Reply-To: <CA+sos7_y76fz5kLEhudeS7cp2AvzcGfgpEMJjTO+PyVif3=AvA@mail.gmail.com>

> Can you please try the change below? If it works and everyone is fine
> with it, I will send a proper patch.

Thank you! That fixed the problem.

Tested-by: Wladimir J. van der Laan <laanwj@gmail.com>

> ---
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -687,6 +687,20 @@ static inline void esdhc_pltfm_set_clock(struct
> sdhci_host *host,
>          return;
>      }
> 
> +    /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */
> +    if (is_imx53_esdhc(imx_data)) {
> +        /*
> +         * According to the i.MX53 reference manual, if DLLCTRL[10] can
> +         * be set, then the controller is eSDHCv3, else it is eSDHCv2.
> +         */
> +        val = readl(host->ioaddr + ESDHC_DLL_CTRL);
> +        writel(val | BIT(10), host->ioaddr + ESDHC_DLL_CTRL);
> +        temp = readl(host->ioaddr + ESDHC_DLL_CTRL);
> +        writel(val, host->ioaddr + ESDHC_DLL_CTRL);
> +        if (temp & BIT(10))
> +            pre_div = 2;
> +    }
> +
>      temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
>      temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN
>          | ESDHC_CLOCK_MASK);

      reply	other threads:[~2018-01-12 10:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 17:15 4.15.0-rc5 fails boot on MX53 LOCO board due to MMC (clock?) issue Wladimir J. van der Laan
2018-01-11 22:11 ` Benoît Thébaudeau
2018-01-12  0:03   ` Benoît Thébaudeau
2018-01-12 10:42     ` Wladimir J. van der Laan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180112104255.GA28577@amethyst.visucore.com \
    --to=laanwj@gmail.com \
    --cc=benoit.thebaudeau.dev@gmail.com \
    --cc=benoit@wsystem.com \
    --cc=cphealy@gmail.com \
    --cc=fabio.estevam@nxp.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox