summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sh_mobile_sdhi.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-04-26 15:47:19 (GMT)
committerChris Ball <cjb@laptop.org>2013-05-26 18:23:21 (GMT)
commit87ae7bbebd9c9b32ad49dde1742aa68b5a86caf8 (patch)
tree9ecb5f53bf34f342631db33ed2d4d307f48d3ff4 /drivers/mmc/host/sh_mobile_sdhi.c
parenteec95ee22611f2207bd991d63a07884de28e6f56 (diff)
downloadlinux-fsl-qoriq-87ae7bbebd9c9b32ad49dde1742aa68b5a86caf8.tar.xz
mmc: sdhi/tmio: add DT DMA support
Add support for initialising DMA from the Device Tree. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 7f45f62..cc4c872 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -144,6 +144,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
struct tmio_mmc_host *host;
int irq, ret, i = 0;
bool multiplexed_isr = true;
+ struct tmio_mmc_dma *dma_priv;
priv = devm_kzalloc(&pdev->dev, sizeof(struct sh_mobile_sdhi), GFP_KERNEL);
if (priv == NULL) {
@@ -152,6 +153,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
}
mmc_data = &priv->mmc_data;
+ dma_priv = &priv->dma_priv;
if (p) {
if (p->init) {
@@ -184,8 +186,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
mmc_data->get_cd = sh_mobile_sdhi_get_cd;
if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
- struct tmio_mmc_dma *dma_priv = &priv->dma_priv;
-
/*
* Yes, we have to provide slave IDs twice to TMIO:
* once as a filter parameter and once for channel
@@ -195,14 +195,14 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
dma_priv->chan_priv_rx = (void *)p->dma_slave_rx;
dma_priv->slave_id_tx = p->dma_slave_tx;
dma_priv->slave_id_rx = p->dma_slave_rx;
-
- dma_priv->alignment_shift = 1; /* 2-byte alignment */
- dma_priv->filter = shdma_chan_filter;
-
- mmc_data->dma = dma_priv;
}
}
+ dma_priv->alignment_shift = 1; /* 2-byte alignment */
+ dma_priv->filter = shdma_chan_filter;
+
+ mmc_data->dma = dma_priv;
+
/*
* All SDHI blocks support 2-byte and larger block sizes in 4-bit
* bus width mode.