public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tegra2: mmc: Enable card-detect for all interfaces.
Date: Tue, 22 Nov 2011 19:09:07 +0100	[thread overview]
Message-ID: <20111122180907.GA6554@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <4ECA85C3.5090801@nvidia.com>

* Stephen Warren wrote:
> On 11/21/2011 01:35 AM, Thierry Reding wrote:
> > This commit drops the interface check for card-detection and leaves it
> > up to the board whether or not a card-detect GPIO is connected. Also,
> > the version field of struct mmc is only valid after the slot has been
> > probed successfully, so depending on that information sort of defeats
> > the purpose of card-detection.
> > 
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> 
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> BTW, in your earlier patch where you added a call to board_mmc_getcd()
> to mmc_init(), do you also need to modify drivers/mmc/fsl_esdhc.c's
> esdhc_init(), since the cd function has already been called?

fsl_esdhc.c contains some fallback code if board_mmc_getcd() isn't
implemented, and I'm not at all familiar with the code so I didn't want to
touch it before getting any comments by the corresponding maintainer. My best
guess, though, is that the code can remain as is, because if the CD check is
done before the ->init() callback and the card isn't inserted, then the code
in question won't be executed anyway. If the card is inserted, however, then
board_mmc_getcd() will be called twice, which shouldn't harm either.

However, it seems like board_mmc_getcd() is used differently by fsl_esdhc in
that it uses the cd parameter as "card absent" (inverted logic). That will of
course have to be adjusted.

Perhaps I should've tagged the patch RFC because it really shouldn't be
applied as-is.

> BTW, you need to CC the MMC maintainers on these patches, or they
> probably won't see them and they won't get applied. See
> http://www.denx.de/wiki/U-Boot/Custodians.

Actually I had put Andy Fleming on Cc, but apparently the list stripped that
again. I'll try Cc'ing Andy again, perhaps it'll work this time.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111122/388547cf/attachment.pgp>

      reply	other threads:[~2011-11-22 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21  8:35 [U-Boot] [PATCH] tegra2: mmc: Enable card-detect for all interfaces Thierry Reding
2011-11-21 17:09 ` Stephen Warren
2011-11-22 18:09   ` Thierry Reding [this message]

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=20111122180907.GA6554@avionic-0098.adnet.avionic-design.de \
    --to=thierry.reding@avionic-design.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