public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Huang Changming-R66093 <r66093@freescale.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Jain Priyanka-B32167 <B32167@freescale.com>
Subject: Re: [PATCH v7] ESDHC: Workaround for data crc error on p1010rdb
Date: Sun, 12 Feb 2012 23:36:13 -0500	[thread overview]
Message-ID: <m2pqdjjqo2.fsf@bob.laptop.org> (raw)
In-Reply-To: <m2ty2vjr11.fsf@bob.laptop.org> (Chris Ball's message of "Sun, 12 Feb 2012 23:28:26 -0500")

Hi,

On Sun, Feb 12 2012, Chris Ball wrote:
> Hi,
>
> On Sun, Feb 12 2012, Huang Changming-R66093 wrote:
>> You are right.
>> I want to use the below code in header file "drivers/mmc/host/sdhci-esdhc.h":
>> if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc"))
>> then I can avoid the twice test of the clock.
>> do you think if it is reasonable?
>
> Yes, I think that's okay; let's try it.  Thanks,

Actually, I think I'm still missing something.  Why doesn't this work?

+static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
+{
+       /* Workaround to reduce the clock frequency for p1010 esdhc */
+       if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc")) {
+               if (clock > 20000000)
+                       clock -= 5000000;
+               if (clock > 40000000)
+                       clock -= 5000000;
+       }
+
+       /* Set the clock */
+       esdhc_set_clock(host, clock);
+}

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2012-02-13  4:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08  8:05 [PATCH v7] ESDHC: Workaround for data crc error on p1010rdb r66093
2012-02-08 15:07 ` Chris Ball
2012-02-09  2:12   ` Huang Changming-R66093
2012-02-11 21:20     ` Chris Ball
2012-02-13  2:40       ` Huang Changming-R66093
2012-02-13  4:28         ` Chris Ball
2012-02-13  4:36           ` Chris Ball [this message]
2012-02-13  7:43             ` Huang Changming-R66093
2012-02-13 20:44               ` Chris Ball
2012-02-14  6:11                 ` Huang Changming-R66093
2012-03-28 11:15                   ` Latency Issue due to patch; " Jain Priyanka-B32167

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=m2pqdjjqo2.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=B32167@freescale.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=r66093@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