aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-01-13 04:59:05 +0000
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-20 10:23:16 +0100
commit5add2aca3a8555a01f5e43b6f524df6fae8fffa5 (patch)
treeba8f577131bcd536286f03ddc428467f3628d736 /drivers/mmc
parent8b4c8f32da91681c0dcd321c9e3cd14f866c5517 (diff)
mmc: tmio: add .enable_dma on tmio_mmc_dma
Some controllers need DMA special register/setting. This patch adds new .enable_dma callback for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc.h2
-rw-r--r--drivers/mmc/host/tmio_mmc_dma.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index c9a84695cff2..0699edb437c4 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -39,6 +39,7 @@
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
struct tmio_mmc_data;
+struct tmio_mmc_host;
struct tmio_mmc_dma {
void *chan_priv_tx;
@@ -46,6 +47,7 @@ struct tmio_mmc_dma {
int slave_id_tx;
int slave_id_rx;
bool (*filter)(struct dma_chan *chan, void *arg);
+ void (*enable)(struct tmio_mmc_host *host, bool enable);
};
struct tmio_mmc_host {
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index 634b2700cb77..eb6b45cdb7ef 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->dma->enable)
+ host->dma->enable(host, enable);
}
void tmio_mmc_abort_dma(struct tmio_mmc_host *host)