From: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
To: Aaron Lu <aaron.lu@amd.com>
Cc: Ulf HANSSON <ulf.hansson@stericsson.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Ball <cjb@laptop.org>,
Per FORLIN <per.forlin@stericsson.com>,
Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] mmc: core: Set correct bus mode before card init
Date: Fri, 16 Sep 2011 08:57:07 +0200 [thread overview]
Message-ID: <4E72F343.3040201@stericsson.com> (raw)
In-Reply-To: <20110916020522.GA3691@lovegaga>
Hi Aaron,
On 09/16/2011 04:05 AM, Aaron Lu wrote:
> Hi Ulf,
>
> I'm not familiar with mmc, but I've some questions on sd below.
>
> On Thu, Sep 15, 2011 at 05:50:38PM +0200, Ulf Hansson wrote:
>> Earlier all cards where initiated with bus mode set as OPENDRAIN, and then
>> later switched to PUSHPULL. According to the MMC/SD/SDIO specifications only
>> MMC cards use OPENDRAIN during init. For both SD and SDIO the bus mode shall
>> be PUSHPULL before attempting to init the card.
> AFAIK, there is no open drain mode in sd, and the sd host controller
> actually does not care about this setting(sdhci_set_ios does not
> manipulate bus_mode stored in ios).
We are currently using a ARM PL18X derivative with added SDIO support
meaning we have one host controller for both MMC, SD and SDIO. This
means that we have to take action on the open drain bit in our host
driver (mmci.c) and set it as indicated by the framework. During card
detection (and likewise during reinitialization after being powered off
due to power save features), the former implementation actually sets
open drain as default, meaning that open drain is set during early card
detection of both MMC, SD and SDIO cards/devices, and then later
switched to push pull which we believe is not correct for SD and SDIO.
>> The consequence of having incorrect bus mode can lead to not being able
>> to detect the card. Therefore the default behavior have now been changed to
>> PUSHPULL in mmc_power_up, and will only be temporarily switched when trying
>> to attach or init a MMC card.
> Do you see any sd cards that failed to be detected due to the incorrect
> bus_mode setting?
We have not seen any SD card fail due to this, but the SDIO device we
have connected (WLAN) does fail to be detected if bus mode is
incorrectly set to open drain during card detect (mmc_rescan).
>
> Anyway, your patch removed an unnecessary call to mmc_set_bus_mode which
> should have no effect if the underlying controller is sdhci.
Great, thanks for your feeback! :o)
Best Regards
Stefan Nilsson
next prev parent reply other threads:[~2011-09-16 6:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 15:50 [PATCH] mmc: core: Set correct bus mode before card init Ulf Hansson
2011-09-16 2:05 ` Aaron Lu
2011-09-16 6:57 ` Stefan Nilsson XK [this message]
2011-09-20 6:48 ` Linus Walleij
2011-09-21 18:20 ` Chris Ball
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=4E72F343.3040201@stericsson.com \
--to=stefan.xk.nilsson@stericsson.com \
--cc=aaron.lu@amd.com \
--cc=cjb@laptop.org \
--cc=lee.jones@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@stericsson.com \
--cc=ulf.hansson@stericsson.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