mmc: sh_mobile_sdhi: use .enable_dma
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 13 Jan 2015 04:59:56 +0000 (04:59 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jan 2015 09:23:45 +0000 (10:23 +0100)
tmio_mmc_dma has .enable_dma callback now.
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mobile_sdhi.c

index bcdadb9503cf4499a8b92d200a08eafb4cbb3ad2..40913299f3ba8ca89e284baaf50e9f7f46346664 100644 (file)
@@ -158,6 +158,11 @@ static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card,
        return blk_size;
 }
 
+static void sh_mobile_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable)
+{
+       sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
+}
+
 static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 {
        const struct of_device_id *of_id =
@@ -230,6 +235,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
                }
        }
        dma_priv->filter = shdma_chan_filter;
+       dma_priv->enable = sh_mobile_sdhi_enable_dma;
 
        mmc_data->alignment_shift = 1; /* 2-byte alignment */