From: Chris Ball <cjb@laptop.org>
To: David Vrabel <david.vrabel@csr.com>, Philip Rakity <prakity@marvell.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] sdhci: adjust sd 3.0 host controller spec clock divider
Date: Tue, 5 Oct 2010 03:34:01 +0100 [thread overview]
Message-ID: <20101005023401.GB9044@void.printf.net> (raw)
In-Reply-To: <CDD4A6CE-487A-4740-87BA-96EEBF1E8217@marvell.com>
Hi David,
On Thu, Sep 30, 2010 at 08:03:14PM -0700, Philip Rakity wrote:
> From: Philip Rakity <prakity@marvell.com>
> Date: Thu, 30 Sep 2010 15:34:24 -0700
> Subject: [PATCH] sdhci: adjust sd 3.0 host controller spec clock divider
>
> The sd 3.0 host spec does not require the clock divider to be a power of 2.
>
> Signed-off-by: Philip Rakity <prakity@marvell.com>
> ---
> drivers/mmc/host/sdhci.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 96c7f60..73a94fe 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1003,14 +1003,12 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
> goto out;
>
> if (host->version >= SDHCI_SPEC_300) {
> - /* Version 3.00 divisors must be a multiple of 2. */
> if (host->max_clk <= clock)
> div = 1;
> else {
> - for (div = 2; div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
> - if ((host->max_clk / div) <= clock)
> - break;
> - }
> + div = host->max_clk/clock;
> + if (host->max_clk % clock)
> + div++;
> }
> } else {
> /* Version 2.00 divisors must be a power of 2. */
> --
Would you mind reviewing this, please? I don't have access to the 3.0
spec.
Thanks very much,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2010-10-05 2:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 3:03 [PATCH] sdhci: adjust sd 3.0 host controller spec clock divider Philip Rakity
2010-10-05 2:34 ` Chris Ball [this message]
2010-10-05 17:22 ` Hein_Tibosch
2010-10-06 13:05 ` David Vrabel
-- strict thread matches above, loose matches on Subject: below --
2010-10-05 23:30 Philip Rakity
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=20101005023401.GB9044@void.printf.net \
--to=cjb@laptop.org \
--cc=david.vrabel@csr.com \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.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 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.