diff options
| author | Johan Rudholm <johan.rudholm@axis.com> | 2014-11-04 10:07:03 -0500 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-10 06:40:56 -0500 |
| commit | ad89fcb290b0b121a3de96d8c5d5f13a23663875 (patch) | |
| tree | ef7a6520913886c419fc2e525ddfcf837181b6e7 /drivers/mmc/core | |
| parent | cd0cfdd2485e6252b3c69284bf09d06c4d303116 (diff) | |
mmc: core: use mmc_send_status to check hw_reset
Signed-off-by: Johan Rudholm <johanru@axis.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
| -rw-r--r-- | drivers/mmc/core/core.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 943f9051ec6d..a32bea23e70c 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
| @@ -2270,15 +2270,9 @@ static int mmc_do_hw_reset(struct mmc_host *host, int check) | |||
| 2270 | 2270 | ||
| 2271 | /* If the reset has happened, then a status command will fail */ | 2271 | /* If the reset has happened, then a status command will fail */ |
| 2272 | if (check) { | 2272 | if (check) { |
| 2273 | struct mmc_command cmd = {0}; | 2273 | u32 status; |
| 2274 | int err; | ||
| 2275 | 2274 | ||
| 2276 | cmd.opcode = MMC_SEND_STATUS; | 2275 | if (!mmc_send_status(card, &status)) { |
| 2277 | if (!mmc_host_is_spi(card->host)) | ||
| 2278 | cmd.arg = card->rca << 16; | ||
| 2279 | cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC; | ||
| 2280 | err = mmc_wait_for_cmd(card->host, &cmd, 0); | ||
| 2281 | if (!err) { | ||
| 2282 | mmc_host_clk_release(host); | 2276 | mmc_host_clk_release(host); |
| 2283 | return -ENOSYS; | 2277 | return -ENOSYS; |
| 2284 | } | 2278 | } |
