aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/msm_sdcc.c
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-11-02 21:46:09 -0500
committerDaniel Walker <dwalker@codeaurora.org>2010-03-18 15:57:57 -0400
commitb3fa579118b239e218e690f5ef76870aff6fe738 (patch)
treed9d89a2608872deda3577f451c81b5ce6a0341cd /drivers/mmc/host/msm_sdcc.c
parent4adbbcc7b6cfb3dcf5ab49b06edb7752391b0e80 (diff)
mmc: msm_sdcc: Snoop SDIO_CCCR_ABORT register
Signed-off-by: San Mehat <san@google.com> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'drivers/mmc/host/msm_sdcc.c')
-rw-r--r--drivers/mmc/host/msm_sdcc.c14
1 files changed, 14 insertions, 0 deletions
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 @@
26#include <linux/log2.h> 26#include <linux/log2.h>
27#include <linux/mmc/host.h> 27#include <linux/mmc/host.h>
28#include <linux/mmc/card.h> 28#include <linux/mmc/card.h>
29#include <linux/mmc/sdio.h>
29#include <linux/clk.h> 30#include <linux/clk.h>
30#include <linux/scatterlist.h> 31#include <linux/scatterlist.h>
31#include <linux/platform_device.h> 32#include <linux/platform_device.h>
@@ -355,6 +356,16 @@ msmsdcc_start_data(struct msmsdcc_host *host, struct mmc_data *data)
355 } 356 }
356} 357}
357 358
359static int
360snoop_cccr_abort(struct mmc_command *cmd)
361{
362 if ((cmd->opcode == 52) &&
363 (cmd->arg & 0x80000000) &&
364 (((cmd->arg >> 9) & 0x1ffff) == SDIO_CCCR_ABORT))
365 return 1;
366 return 0;
367}
368
358static void 369static void
359msmsdcc_start_command(struct msmsdcc_host *host, struct mmc_command *cmd, u32 c) 370msmsdcc_start_command(struct msmsdcc_host *host, struct mmc_command *cmd, u32 c)
360{ 371{
@@ -381,6 +392,9 @@ msmsdcc_start_command(struct msmsdcc_host *host, struct mmc_command *cmd, u32 c)
381 if (cmd == cmd->mrq->stop) 392 if (cmd == cmd->mrq->stop)
382 c |= MCI_CSPM_MCIABORT; 393 c |= MCI_CSPM_MCIABORT;
383 394
395 if (snoop_cccr_abort(cmd))
396 c |= MCI_CSPM_MCIABORT;
397
384 host->curr.cmd = cmd; 398 host->curr.cmd = cmd;
385 399
386 host->stats.cmds++; 400 host->stats.cmds++;