diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-03-20 17:16:39 +0800 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 14:42:18 +0100 |
commit | 177e43c68d112a93d74e07172a7ac29984c0c829 (patch) | |
tree | faee0f344430463c8c7cc8f935a8a3c0ec879a3d /drivers | |
parent | ce3580b0c1cd5a0ce65704085ed7ede4377e09da (diff) |
MLK-10453 mmc: fix possible unintialized ocr
This commit ca4113da25b42bce44a2e7998966a47352f11613
"mmc: fix OCR Polling"
does not consider cmd structure, and may leave it in uninitialized state.
We can directly use op_cond_response here, since until here,
op_cond_response already get the OCR value from chip.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Suggested-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a033d2d43904f27778ee6a44f3e35494f9f72152)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 43a9a8ab9f..5bc8d6340c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -436,7 +436,10 @@ static int mmc_complete_op_cond(struct mmc *mmc) } mmc->version = MMC_VERSION_UNKNOWN; - mmc->ocr = cmd.response[0]; + if (mmc_host_is_spi(mmc)) + mmc->ocr = cmd.response[0]; + else + mmc->ocr = mmc->op_cond_response; mmc->high_capacity = ((mmc->ocr & OCR_HCS) == OCR_HCS); mmc->rca = 1; |