From: Adrian Hunter <adrian.hunter@intel.com>
To: Yangbo Lu <yangbo.lu@nxp.com>,
linux-mmc@vger.kernel.org, ulf.hansson@linaro.org
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>
Subject: Re: [PATCH] mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
Date: Tue, 25 Apr 2017 12:44:25 +0300 [thread overview]
Message-ID: <a9567581-4b9e-584c-ab14-6955cce1b700@intel.com> (raw)
In-Reply-To: <1492671509-22044-1-git-send-email-yangbo.lu@nxp.com>
On 20/04/17 09:58, Yangbo Lu wrote:
> The ls1046a datasheet specified that the max SD clock frequency
> for eSDHC SDR104/HS200 was 167MHz, and the ls1012a datasheet
> specified it's 125MHz for ls1012a. So this patch is to add the
> limitation.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-of-esdhc.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 49ac197..57966ef 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -456,6 +456,20 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
> if (esdhc->vendor_ver < VENDOR_V_23)
> pre_div = 2;
>
> + /*
> + * Limit SD clock to 167MHz for ls1046a according to its datasheet
> + */
> + if (clock > 167000000 &&
> + of_find_compatible_node(NULL, NULL, "fsl,ls1046a-esdhc"))
> + clock = 167000000;
> +
> + /*
> + * Limit SD clock to 125MHz for ls1012a according to its datasheet
> + */
> + if (clock > 125000000 &&
> + of_find_compatible_node(NULL, NULL, "fsl,ls1012a-esdhc"))
> + clock = 125000000;
> +
> /* 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:[~2017-04-25 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 6:58 [PATCH] mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a Yangbo Lu
2017-04-25 9:44 ` Adrian Hunter [this message]
2017-04-28 10:37 ` 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=a9567581-4b9e-584c-ab14-6955cce1b700@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=xiaobo.xie@nxp.com \
--cc=yangbo.lu@nxp.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