From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] mmc: Properly determine maximum supported bus width
Date: Tue, 27 Nov 2012 16:40:17 -0700 [thread overview]
Message-ID: <50B54F61.9060105@wwwdotorg.org> (raw)
In-Reply-To: <FE3169BF-37F7-4C28-98BD-0DA37A35C54E@freescale.com>
On 11/26/2012 04:33 PM, Fleming Andy-AFLEMING wrote:
> Yes, I'm processing my queue today.
This patch didn't show up in the pull request you just sent.
> On Nov 26, 2012, at 17:27, "Stephen Warren" <swarren@wwwdotorg.org> wrote:
>
>> On 10/31/2012 11:02 PM, Andy Fleming wrote:
>>> At some point, a confusion arose about the use of the bit
>>> definitions in host_caps for bus widths, and the value
>>> in ext_csd. By coincidence, a simple shift could convert
>>> between one and the other:
>>>
>>> MMC_MODE_1BIT = 0, EXT_CSD_BUS_WIDTH_1 = 0
>>> MMC_MODE_4BIT = 0x100, EXT_CSD_BUS_WIDTH_4 = 1
>>> MMC_MODE_8BIT = 0x200, EXT_CSD_BUS_WIDTH_8 = 2
>>>
>>> However, as host_caps is a bitmask of supported things,
>>> there is not, in fact, a one-to-one correspondence. host_caps
>>> is capable of containing MODE_4BIT | MODE_8BIT, so nonsensical
>>> things were happening where we would try to set the bus width
>>> to 12.
>>>
>>> The new code clarifies the very different namespaces:
>>>
>>> host_caps/card_caps = bitmask (MMC_MODE_*)
>>> ext CSD fields are just an index (EXT_CSD_BUS_WIDTH_*)
>>> mmc->bus_width integer number of bits (1, 4, 8)
>>>
>>> We create arrays to map between the namespaces, like in Linux.
>>
>> Andy, is this patch likely to get merged soon to u-boot.git branch
>> master? Unfortunately, some Tegra patches that ideally rely on this
>> patch being present have already been applied and merged into
>> u-boot-arm.git branch master.
>>
>
next prev parent reply other threads:[~2012-11-27 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 5:02 [U-Boot] [RFC] mmc: Properly determine maximum supported bus width Andy Fleming
2012-11-01 8:07 ` Jaehoon Chung
2012-11-02 16:12 ` Stephen Warren
2012-11-26 23:27 ` Stephen Warren
2012-11-26 23:33 ` Fleming Andy-AFLEMING
2012-11-27 23:40 ` Stephen Warren [this message]
2012-11-27 23:44 ` Andy Fleming
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=50B54F61.9060105@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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