From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"yangbo.lu@freescale.com" <yangbo.lu@freescale.com>
Subject: Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value
Date: Tue, 11 Aug 2015 08:11:36 +0000 [thread overview]
Message-ID: <1439280697.3120.98.camel@transmode.se> (raw)
In-Reply-To: <1439261614-38605-1-git-send-email-yangbo.lu@freescale.com>
On Tue, 2015-08-11 at 10:53 +0800, Yangbo Lu wrote:
> For eSDHC(version < 2.3), the pre divider only could divide base clock
> by 2 at least. Add workaround for this to avoid unexpected issue.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
> ---
Thanks a lot, here is my:
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> drivers/mmc/host/sdhci-of-esdhc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 797be75..653f335 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -208,6 +208,12 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
> if (clock == 0)
> return;
>
> + /* Workaround to start pre_div at 2 for VNN < VENDOR_V_23 */
> + temp = esdhc_readw(host, SDHCI_HOST_VERSION);
> + temp = (temp & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
> + if (temp < VENDOR_V_23)
> + pre_div = 2;
> +
> /* Workaround to reduce the clock frequency for p1010 esdhc */
> if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc")) {
> if (clock > 20000000)
next prev parent reply other threads:[~2015-08-11 8:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 2:53 [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value Yangbo Lu
2015-08-11 8:11 ` Joakim Tjernlund [this message]
2015-08-25 12:05 ` Ulf Hansson
2015-08-25 12:21 ` Joakim Tjernlund
2015-08-25 13:56 ` Ulf Hansson
2015-08-25 14:00 ` Joakim Tjernlund
2015-08-25 14:20 ` Ulf Hansson
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=1439280697.3120.98.camel@transmode.se \
--to=joakim.tjernlund@transmode.se \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=yangbo.lu@freescale.com \
/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