Skip to contentSkip to conversation

mmc: check correctness of the voltage mask in ocr

PATCH New Stefano Babic 1 participant 1 message Jan 20, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH v3 6/11 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.

---
 drivers/mmc/mmc.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
drivers/mmc/mmc.c +9 -1
index b69ce15..d91b9b7 100644
@@ -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;
Signature · 1 line
1.6.3.3