summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-11-02 18:46:09 -0800
committerDaniel Walker <dwalker@codeaurora.org>2010-03-18 12:57:57 -0700
commitb3fa579118b239e218e690f5ef76870aff6fe738 (patch)
treed9d89a2608872deda3577f451c81b5ce6a0341cd /drivers/mmc
parent4adbbcc7b6cfb3dcf5ab49b06edb7752391b0e80 (diff)
downloadop-kernel-dev-b3fa579118b239e218e690f5ef76870aff6fe738.zip
op-kernel-dev-b3fa579118b239e218e690f5ef76870aff6fe738.tar.gz
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')
-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 977932a..f4f7883 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -26,6 +26,7 @@
#include <linux/log2.h>
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
+#include <linux/mmc/sdio.h>
#include <linux/clk.h>
#include <linux/scatterlist.h>
#include <linux/platform_device.h>
@@ -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++;
OpenPOWER on IntegriCloud