From b1109600d403ee05060ab2c8294b7a9aba34d266 Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Mon, 16 Apr 2012 21:47:16 +0200 Subject: [PATCH] mci: pxamci fix CMD12 handling The pxamci requires a bit to be set in the command control register when a CMD12 is sent. Set it, as required in the PXA Developer Manuel, chapter "Stop Data Transmission Command (CMD12 or IO/Abort with CMD52)". Signed-off-by: Robert Jarzmik Signed-off-by: Sascha Hauer --- drivers/mci/pxamci.c | 3 +++ drivers/mci/pxamci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c index f251d75f4..c51fb771a 100644 --- a/drivers/mci/pxamci.c +++ b/drivers/mci/pxamci.c @@ -188,6 +188,9 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mci_cmd *cmd, break; } + if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) + cmdat |= CMDAT_STOP_TRAN; + mmc_writel(cmd->cmdidx, MMC_CMD); mmc_writel(cmd->cmdarg >> 16, MMC_ARGH); mmc_writel(cmd->cmdarg & 0xffff, MMC_ARGL); diff --git a/drivers/mci/pxamci.h b/drivers/mci/pxamci.h index 18d12a303..07dea451c 100644 --- a/drivers/mci/pxamci.h +++ b/drivers/mci/pxamci.h @@ -40,6 +40,7 @@ #define MMC_CMDAT 0x0010 #define CMDAT_SDIO_INT_EN (1 << 11) +#define CMDAT_STOP_TRAN (1 << 10) #define CMDAT_SD_4DAT (1 << 8) #define CMDAT_DMAEN (1 << 7) #define CMDAT_INIT (1 << 6)