summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-11-21 10:57:32 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 14:18:20 +0100
commit8e415aff9ffd46a8912322d62fad1303edb3123b (patch)
treecc4a1372bc1b2a2aa3e54a0525a4d7fb2ca00134 /drivers/dma
parent970ea218d349cde20307605e0a882d1291920a7b (diff)
Revert "MLK-11019-2: mxs-sdma: add im7d dma-apbh clock"
This reverts commit 2366daa4b1ae35c7af031a52659f80efadfc0f7b. With the new clock tree, as modeled with commit 23ed0c25201c ("clk: imx7d: create clocks behind rawnand clock gate") no special clock handling for i.MX 7 is necessary.
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/mxs-dma.c60
1 files changed, 6 insertions, 54 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 4a85d3252e7b..fb2c7bf007d0 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -135,7 +135,6 @@ enum mxs_dma_devtype {
enum mxs_dma_id {
IMX23_DMA,
IMX28_DMA,
- IMX7D_DMA,
};
struct mxs_dma_engine {
@@ -143,7 +142,6 @@ struct mxs_dma_engine {
enum mxs_dma_devtype type;
void __iomem *base;
struct clk *clk;
- struct clk *clk_io;
struct dma_device dma_device;
struct device_dma_parameters dma_parms;
struct mxs_dma_chan mxs_chans[MXS_DMA_CHANNELS];
@@ -169,9 +167,6 @@ static struct mxs_dma_type mxs_dma_types[] = {
}, {
.id = IMX28_DMA,
.type = MXS_DMA_APBX,
- }, {
- .id = IMX7D_DMA,
- .type = MXS_DMA_APBH,
}
};
@@ -189,9 +184,6 @@ static const struct platform_device_id mxs_dma_ids[] = {
.name = "imx28-dma-apbx",
.driver_data = (kernel_ulong_t) &mxs_dma_types[3],
}, {
- .name = "imx7d-dma-apbh",
- .driver_data = (kernel_ulong_t) &mxs_dma_types[4],
- }, {
/* end of list */
}
};
@@ -201,7 +193,6 @@ static const struct of_device_id mxs_dma_dt_ids[] = {
{ .compatible = "fsl,imx23-dma-apbx", .data = &mxs_dma_ids[1], },
{ .compatible = "fsl,imx28-dma-apbh", .data = &mxs_dma_ids[2], },
{ .compatible = "fsl,imx28-dma-apbx", .data = &mxs_dma_ids[3], },
- { .compatible = "fsl,imx7d-dma-apbh", .data = &mxs_dma_ids[4], },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, mxs_dma_dt_ids);
@@ -446,12 +437,6 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan)
if (ret)
goto err_clk;
- if (mxs_dma->dev_id == IMX7D_DMA) {
- ret = clk_prepare_enable(mxs_dma->clk_io);
- if (ret)
- goto err_clk_unprepare;
- }
-
mxs_dma_reset_chan(chan);
dma_async_tx_descriptor_init(&mxs_chan->desc, chan);
@@ -462,8 +447,6 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan)
return 0;
-err_clk_unprepare:
- clk_disable_unprepare(mxs_dma->clk);
err_clk:
free_irq(mxs_chan->chan_irq, mxs_dma);
err_irq:
@@ -485,9 +468,6 @@ static void mxs_dma_free_chan_resources(struct dma_chan *chan)
dma_free_coherent(mxs_dma->dma_device.dev, CCW_BLOCK_SIZE,
mxs_chan->ccw, mxs_chan->ccw_phys);
- if (mxs_dma->dev_id == IMX7D_DMA)
- clk_disable_unprepare(mxs_dma->clk_io);
-
clk_disable_unprepare(mxs_dma->clk);
}
@@ -718,12 +698,6 @@ static int mxs_dma_init(struct mxs_dma_engine *mxs_dma)
if (ret)
return ret;
- if (mxs_dma->dev_id == IMX7D_DMA) {
- ret = clk_prepare_enable(mxs_dma->clk_io);
- if (ret)
- goto err_out;
- }
-
ret = stmp_reset_block(mxs_dma->base);
if (ret)
goto err_out;
@@ -826,19 +800,9 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
if (IS_ERR(mxs_dma->base))
return PTR_ERR(mxs_dma->base);
- if (mxs_dma->dev_id == IMX7D_DMA) {
- mxs_dma->clk = devm_clk_get(&pdev->dev, "dma_apbh_bch");
- if (IS_ERR(mxs_dma->clk))
- return PTR_ERR(mxs_dma->clk);
- mxs_dma->clk_io = devm_clk_get(&pdev->dev, "dma_apbh_io");
- if (IS_ERR(mxs_dma->clk_io))
- return PTR_ERR(mxs_dma->clk_io);
-
- } else {
- mxs_dma->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(mxs_dma->clk))
- return PTR_ERR(mxs_dma->clk);
- }
+ mxs_dma->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(mxs_dma->clk))
+ return PTR_ERR(mxs_dma->clk);
dma_cap_set(DMA_SLAVE, mxs_dma->dma_device.cap_mask);
dma_cap_set(DMA_CYCLIC, mxs_dma->dma_device.cap_mask);
@@ -910,9 +874,6 @@ static int mxs_dma_runtime_suspend(struct device *dev)
{
struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
- if (mxs_dma->dev_id == IMX7D_DMA)
- clk_disable(mxs_dma->clk_io);
-
clk_disable(mxs_dma->clk);
return 0;
}
@@ -923,20 +884,11 @@ static int mxs_dma_runtime_resume(struct device *dev)
int ret;
ret = clk_enable(mxs_dma->clk);
- if (ret < 0)
- goto err_out;
-
- if (mxs_dma->dev_id == IMX7D_DMA) {
- ret = clk_enable(mxs_dma->clk_io);
- if (ret < 0)
- goto err_out;
+ if (ret < 0) {
+ dev_err(dev, "clk_enable failed: %d\n", ret);
+ return ret;
}
-
return 0;
-
-err_out:
- dev_err(dev, "clk_enable failed: %d\n", ret);
- return ret;
}
static int mxs_dma_pm_suspend(struct device *dev)