testing mmc slot w/ generic mmc
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
Quoted 2 lines · 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