This is a note to let you know that I've just added the patch titled
Revert dma: imx-dma: Fix kernel crash due to missing clock conversion
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 9ea2c02bafe276e97b592a046ac733610a6d57fd Mon Sep 17 00:00:00 2001
From: Fabio Estevam <[email protected]>
Date: Tue, 3 Jul 2012 15:33:29 -0300
Subject: Revert dma: imx-dma: Fix kernel crash due to missing clock conversion
This reverts 9ea2c02bafe276e97b592a046ac733610a6d57fd, which was commit
a2367db2ec5e7fc6fe93e221e0fcdee81b053daf upstream.
It broke the build on 3.4, and was not needed there.
Reported-by: Eric Bénard <[email protected]>
Cc: Javier Martin <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Vinod Koul <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
--- b/drivers/dma/imx-dma.c
+++ a/drivers/dma/imx-dma.c
@@ -172,8 +172,7 @@
struct device_dma_parameters dma_parms;
struct dma_device dma_device;
void __iomem *base;
+ struct clk *dma_clk;
- struct clk *dma_ahb;
- struct clk *dma_ipg;
spinlock_t lock;
struct imx_dma_2d_config slots_2d[IMX_DMA_2D_SLOTS];
struct imxdma_channel channel[IMX_DMA_CHANNELS];
@@ -977,20 +976,10 @@
return 0;
}
+ imxdma->dma_clk = clk_get(NULL, "dma");
+ if (IS_ERR(imxdma->dma_clk))
+ return PTR_ERR(imxdma->dma_clk);
+ clk_enable(imxdma->dma_clk);
- imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg");
- if (IS_ERR(imxdma->dma_ipg)) {
- ret = PTR_ERR(imxdma->dma_ipg);
- goto err_clk;
- }
-
- imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb");
- if (IS_ERR(imxdma->dma_ahb)) {
- ret = PTR_ERR(imxdma->dma_ahb);
- goto err_clk;
- }
-
- clk_prepare_enable(imxdma->dma_ipg);
- clk_prepare_enable(imxdma->dma_ahb);
/* reset DMA module */
imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR);
@@ -999,14 +988,16 @@
ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA",
imxdma);
if (ret) {
dev_warn(imxdma->dev, "Can't register IRQ for DMA\n");
+ kfree(imxdma);
+ return ret;
- goto err_enable;
}
ret = request_irq(MX1_DMA_ERR, imxdma_err_handler, 0, "DMA",
imxdma);
if (ret) {
dev_warn(imxdma->dev, "Can't register ERRIRQ for
DMA\n");
free_irq(MX1_DMA_INT, NULL);
+ kfree(imxdma);
+ return ret;
- goto err_enable;
}
}
@@ -1103,10 +1094,7 @@
free_irq(MX1_DMA_INT, NULL);
free_irq(MX1_DMA_ERR, NULL);
}
+
-err_enable:
- clk_disable_unprepare(imxdma->dma_ipg);
- clk_disable_unprepare(imxdma->dma_ahb);
-err_clk:
kfree(imxdma);
return ret;
}
@@ -1126,9 +1114,7 @@
free_irq(MX1_DMA_ERR, NULL);
}
+ kfree(imxdma);
- clk_disable_unprepare(imxdma->dma_ipg);
- clk_disable_unprepare(imxdma->dma_ahb);
- kfree(imxdma);
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html