From: Michael Jones <michael.jones@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] testing mmc slot w/ generic mmc
Date: Wed, 25 May 2011 16:11:21 +0200 [thread overview]
Message-ID: <4DDD0E09.5000609@matrix-vision.de> (raw)
I have a custom OMAP3-based board with 2 MMC slots. During my boot
sequence, I want to test whether a card is present in mmc slot 1, and
boot from it if so. Otherwise it will continue to look at other
options. Until now, w/o CONFIG_GENERIC_MMC, I have used 'mmc init 1' to
do this, which would return false if there was no card. It sounds like
I should be using generic MMC, so now I'm trying to change my boot
script to use the generic mmc commands. However, none of them (aside
from read/write) seems to return false just because there is no card. A
workaround of course is to just try to read from it.
Wouldn't it make sense for 'mmc dev N', or at least 'mmc rescan' to
return failed if there's no card in slot N? Or is there a use case for
setting the current MMC device to an empty slot? They both call
mmc_init(), which returns UNUSABLE_ERR, but this is ignored. I would
like them to return 1 when mmc_init() fails.
Sound reasonable? Or is there already a better way to test whether an
mmc slot is populated?
Am I supposed to wait until the next merge window to submit such a patch
for review?
-Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
next reply other threads:[~2011-05-25 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 14:11 Michael Jones [this message]
2011-05-25 14:56 ` [U-Boot] [RFC] testing mmc slot w/ generic mmc Mike Frysinger
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=4DDD0E09.5000609@matrix-vision.de \
--to=michael.jones@matrix-vision.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.