summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sh_mobile_sdhi.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-04-26 17:47:17 +0200
committerChris Ball <cjb@laptop.org>2013-05-26 14:23:19 -0400
commit03a0675b2a112038a8a5078d8815e3f7356c7064 (patch)
treeedf494afa3c628bf9a91242c0e9cba1717d82891 /drivers/mmc/host/sh_mobile_sdhi.c
parentfc79a4d6dfa736672281aedbe384ece1f0044756 (diff)
downloadblackbird-op-linux-03a0675b2a112038a8a5078d8815e3f7356c7064.tar.gz
blackbird-op-linux-03a0675b2a112038a8a5078d8815e3f7356c7064.zip
mmc: sdhi/tmio: make DMA filter implementation specific
So far only the SDHI implementation uses TMIO MMC with DMA. That way a DMA channel filter function, defined in the TMIO driver wasn't a problem. However, such a filter function is DMA controller specific. Since the SDHI glue is only running on systems with the SHDMA DMA controller, the filter function can safely be provided by it. Move it into SDHI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sh_mobile_sdhi.c')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index fe90853900b4..e0088d7f5f85 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -20,6 +20,7 @@
#include <linux/kernel.h>
#include <linux/clk.h>
+#include <linux/dmaengine.h>
#include <linux/slab.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
@@ -124,6 +125,13 @@ static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev)
mmc_detect_change(dev_get_drvdata(&pdev->dev), msecs_to_jiffies(100));
}
+static bool sh_mobile_sdhi_filter(struct dma_chan *chan, void *arg)
+{
+ dev_dbg(chan->device->dev, "%s: slave data %p\n", __func__, arg);
+ chan->private = arg;
+ return true;
+}
+
static const struct sh_mobile_sdhi_ops sdhi_ops = {
.cd_wakeup = sh_mobile_sdhi_cd_wakeup,
};
@@ -191,6 +199,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
priv->dma_priv.chan_priv_tx = &priv->param_tx.shdma_slave;
priv->dma_priv.chan_priv_rx = &priv->param_rx.shdma_slave;
priv->dma_priv.alignment_shift = 1; /* 2-byte alignment */
+ priv->dma_priv.filter = sh_mobile_sdhi_filter;
mmc_data->dma = &priv->dma_priv;
}
}
OpenPOWER on IntegriCloud