From b3fa579118b239e218e690f5ef76870aff6fe738 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Mon, 2 Nov 2009 18:46:09 -0800 Subject: [PATCH] mmc: msm_sdcc: Snoop SDIO_CCCR_ABORT register Signed-off-by: San Mehat Signed-off-by: Daniel Walker --- drivers/mmc/host/msm_sdcc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index 977932a4bf4b..f4f7883271f0 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -355,6 +356,16 @@ msmsdcc_start_data(struct msmsdcc_host *host, struct mmc_data *data) } } +static int +snoop_cccr_abort(struct mmc_command *cmd) +{ + if ((cmd->opcode == 52) && + (cmd->arg & 0x80000000) && + (((cmd->arg >> 9) & 0x1ffff) == SDIO_CCCR_ABORT)) + return 1; + return 0; +} + static void msmsdcc_start_command(struct msmsdcc_host *host, struct mmc_command *cmd, u32 c) { @@ -381,6 +392,9 @@ msmsdcc_start_command(struct msmsdcc_host *host, struct mmc_command *cmd, u32 c) if (cmd == cmd->mrq->stop) c |= MCI_CSPM_MCIABORT; + if (snoop_cccr_abort(cmd)) + c |= MCI_CSPM_MCIABORT; + host->curr.cmd = cmd; host->stats.cmds++; -- 2.20.1