All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC] testing mmc slot w/ generic mmc
@ 2011-05-25 14:11 Michael Jones
  2011-05-25 14:56 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Jones @ 2011-05-25 14:11 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] [RFC] testing mmc slot w/ generic mmc
  2011-05-25 14:11 [U-Boot] [RFC] testing mmc slot w/ generic mmc Michael Jones
@ 2011-05-25 14:56 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-05-25 14:56 UTC (permalink / raw)
  To: u-boot

On Wednesday, May 25, 2011 10:11:21 Michael Jones wrote:
> Am I supposed to wait until the next merge window to submit such a patch
> for review?

you post patches at any time.  they only get merged (if new feature based) 
into the main tree during the merge window.  but things need to be hashed out 
and reviewed before they can even be merged.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110525/effccf69/attachment.pgp 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-25 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 14:11 [U-Boot] [RFC] testing mmc slot w/ generic mmc Michael Jones
2011-05-25 14:56 ` Mike Frysinger

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.