aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sh_mmcif.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-06-12 16:56:09 -0400
committerChris Ball <cjb@laptop.org>2012-07-21 00:02:07 -0400
commit7541ca98477862e2e9988c6c2ceadbdccefa9d77 (patch)
treea1a98f8dba20ed272b9c7acbd7cd2ed2e4da60de /drivers/mmc/host/sh_mmcif.c
parent94c6cee91bebfc17596243b6a5f4fe910feec426 (diff)
mmc: sh_mmcif: Support MMC_SLEEP_AWAKE command
The MMC_SLEEP_AWAKE and SD_IO_SEND_OP_COND commands share the same opcode. SD_IO_SEND_OP_COND isn't supported by the SH MMCIF, but MMC_SLEEP_AWAKE is. Discriminate between the two commands using the command flags, and reject SD_IO_SEND_OP_COND only. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sh_mmcif.c')
-rw-r--r--drivers/mmc/host/sh_mmcif.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 724b35e85a26..e32da1126e8d 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -892,21 +892,15 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq)
892 892
893 switch (mrq->cmd->opcode) { 893 switch (mrq->cmd->opcode) {
894 /* MMCIF does not support SD/SDIO command */ 894 /* MMCIF does not support SD/SDIO command */
895 case SD_IO_SEND_OP_COND: 895 case MMC_SLEEP_AWAKE: /* = SD_IO_SEND_OP_COND (5) */
896 case MMC_SEND_EXT_CSD: /* = SD_SEND_IF_COND (8) */
897 if ((mrq->cmd->flags & MMC_CMD_MASK) != MMC_CMD_BCR)
898 break;
896 case MMC_APP_CMD: 899 case MMC_APP_CMD:
897 host->state = STATE_IDLE; 900 host->state = STATE_IDLE;
898 mrq->cmd->error = -ETIMEDOUT; 901 mrq->cmd->error = -ETIMEDOUT;
899 mmc_request_done(mmc, mrq); 902 mmc_request_done(mmc, mrq);
900 return; 903 return;
901 case MMC_SEND_EXT_CSD: /* = SD_SEND_IF_COND (8) */
902 if (!mrq->data) {
903 /* send_if_cond cmd (not support) */
904 host->state = STATE_IDLE;
905 mrq->cmd->error = -ETIMEDOUT;
906 mmc_request_done(mmc, mrq);
907 return;
908 }
909 break;
910 default: 904 default:
911 break; 905 break;
912 } 906 }