[PATCH 4/6] mci: pxamci fix CMD12 handling

Robert Jarzmik robert.jarzmik at free.fr
Mon Apr 16 15:47:16 EDT 2012


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 <robert.jarzmik at free.fr>
---
 drivers/mci/pxamci.c |    3 +++
 drivers/mci/pxamci.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c
index f251d75..c51fb77 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 18d12a3..07dea45 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)
-- 
1.7.5.4




More information about the barebox mailing list