From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: fsl_esdhc: Add workaround for auto-clock gate errata ENGcm03648
Date: Sat, 17 Mar 2012 12:47:30 +0100 [thread overview]
Message-ID: <4F6479D2.1060403@denx.de> (raw)
In-Reply-To: <4F645A71.3020205@de.bosch.com>
On 17/03/2012 10:33, Dirk Behme wrote:
> Hmm, I'm unsure about this. Looking at the 3 referenced Freescale
> patches and at the way the Freescale commits look, I was under the
> impression that the first patch was improved by Freescale two times to
> the then 'final' state.
>
> At least the first patch
>
> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=e436525a70fe47623d346bc7d9f08f12ff8ad787
>
>
> and the third
>
> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=97efee177f82b082db9d2019ed641c5b99b3f54b
>
>
> definitely should be one patch. The third one wouldn't be there if there
> would have been a proper review of the first one ;)
>
> And the commit message of the second patch
>
> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=a77c6fec8596891be96b2cdbc742c9824844b92a
>
>
> mentions that the delay can be removed due to the first patch. So I was
> under the impression that this could have been done in the first patch,
> already, too.
>
> But anyway, as you said, this shouldn't be a blocker.
No, it is not. I am fine with your explanation.
>>> + if (!data && (cmd->resp_type & MMC_RSP_BUSY)) {
>>> + sysctl_restore = esdhc_read32(®s->sysctl);
>>> + esdhc_write32(®s->sysctl, sysctl_restore | 0xF);
>>> + }
>>> +
>>
>> I see two issue. There is not a SDCLKEN bit in the PowerPC ESDHC, as far
>> as I can see (for example, in MPC8536). Should we not use the HOSTVER
>> register to handle these cases ?
>>
>> The comment says you are disabling auto-clock. However, in the register
>> you are enabling all clocks (PEREN / SDCLKEN /..). Can you explain
>> better the reason ? Do you want really disabling clocks ?
>
> I have to admit that I have no idea :(
>
> I'm no SD/MMC expert. This patch was created doing a functional diff. On
> a custom board we found that the imx_esdhc.c driver in Freescale's old
> U-Boot works fine, while the mainline fsl_esdhc.c we talk about here
> doesn't. Then, we traced it down to the changes we talk about here and
> ported them to the mainline fsl_esdhc.c. This fixes our issue.
> Unfortunately, there is no real understanding what these changes do.
At least the comment seems wrong : code is enabling cloks in the sysctl
register. You should change or drop the comment.
>
> Could any SD expert help with this?
>> This ENGcm03648 is not mentioned in the commit message, it seems another
>> issue...
>
> Hmm? The subject is about "errata ENGcm03648" And the commit messages
> refers to
>
> ...
> ENGR00156405 ESDHC: Add workaround for auto-clock gate errata ENGcm03648
> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=e436525a70fe47623d346bc7d9f08f12ff8ad787
Ah, I see, I was confused with the ENG numbers...
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2012-03-17 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 12:36 [U-Boot] [PATCH] mmc: fsl_esdhc: Add workaround for auto-clock gate errata ENGcm03648 Dirk Behme
2012-03-15 9:56 ` Stefano Babic
2012-03-17 9:33 ` Dirk Behme
2012-03-17 11:47 ` Stefano Babic [this message]
2012-03-26 13:04 ` Dirk Behme
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=4F6479D2.1060403@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/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