mmc: sdhci: add the DMA select for SDMA
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 20 Sep 2012 20:31:55 +0000 (20:31 +0000)
committerAndy Fleming <afleming@freescale.com>
Mon, 22 Oct 2012 07:53:36 +0000 (02:53 -0500)
In host-control register, DMA select bit field is present.
BUt in sdhci.c, didn't select for DMA.
if set CONFIG_MMC_SDMA, we need to set SDMA-select bit.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
drivers/mmc/sdhci.c

index 932987427c3d60c79a3a3f63f914f412bd43cc6f..15b46868ac0db06b3d7792bd8fb6bd48fc4791e5 100644 (file)
@@ -82,6 +82,13 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
                                unsigned int start_addr)
 {
        unsigned int stat, rdy, mask, timeout, block = 0;
+#ifdef CONFIG_MMC_SDMA
+       unsigned char ctrl;
+       ctrl = sdhci_readl(host, SDHCI_HOST_CONTROL);
+       ctrl &= ~SDHCI_CTRL_DMA_MASK;
+       ctrl |= SDHCI_CTRL_SDMA;
+       sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL);
+#endif
 
        timeout = 1000000;
        rdy = SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_AVAIL;