summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2010-01-20 18:20:39 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-03-07 12:36:36 -0600
commit250de12bc2f7842807d25e16971c5bea59c3a4b1 (patch)
tree0ddd76f688dac35527ac23878fa0c34704873eb0 /drivers/mmc/mmc.c
parent71d64c0e4fa5910c15eca175a8f3b0e1c1d6711c (diff)
downloadu-boot-imx-250de12bc2f7842807d25e16971c5bea59c3a4b1.zip
u-boot-imx-250de12bc2f7842807d25e16971c5bea59c3a4b1.tar.gz
u-boot-imx-250de12bc2f7842807d25e16971c5bea59c3a4b1.tar.bz2
mmc: check correctness of the voltage mask in ocr
Most cards do not answer if some reserved bits in the ocr are set. However, some controllers can set bit 7 (reserved for low voltages), but how to manage low voltages SD card is not yet specified. Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r--drivers/mmc/mmc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index b69ce15..d91b9b7 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -273,7 +273,15 @@ sd_send_op_cond(struct mmc *mmc)
cmd.cmdidx = SD_CMD_APP_SEND_OP_COND;
cmd.resp_type = MMC_RSP_R3;
- cmd.cmdarg = mmc->voltages;
+
+ /*
+ * Most cards do not answer if some reserved bits
+ * in the ocr are set. However, Some controller
+ * can set bit 7 (reserved for low voltages), but
+ * how to manage low voltages SD card is not yet
+ * specified.
+ */
+ cmd.cmdarg = mmc->voltages & 0xff8000;
if (mmc->version == SD_VERSION_2)
cmd.cmdarg |= OCR_HCS;