From: Kuninori Morimoto <kuninori.morimoto...@renesas.com>

Some controllers need DMA special register/setting.
This patch adds new .enable_dma callback for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com>
---
 drivers/mmc/host/tmio_mmc_dma.c |    3 +++
 include/linux/mfd/tmio.h        |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index 7d07738..f0bf6df 100644
--- a/drivers/mmc/host/tmio_mmc_dma.c
+++ b/drivers/mmc/host/tmio_mmc_dma.c
@@ -30,6 +30,9 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool 
enable)
 
        if (host->pdata->flags & TMIO_MMC_HAVE_CTL_DMA_REG)
                sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
+
+       if (host->pdata->dma->enable)
+               host->pdata->dma->enable(host, enable);
 }
 
 void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 5738817..6788f9b 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -111,6 +111,7 @@ void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int 
state);
 void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
 
 struct dma_chan;
+struct tmio_mmc_host;
 
 struct tmio_mmc_dma {
        void *chan_priv_tx;
@@ -120,10 +121,9 @@ struct tmio_mmc_dma {
        int alignment_shift;
        dma_addr_t dma_rx_offset;
        bool (*filter)(struct dma_chan *chan, void *arg);
+       void (*enable)(struct tmio_mmc_host *host, bool enable);
 };
 
-struct tmio_mmc_host;
-
 /*
  * data for the MMC controller
  */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to