From: Greg Kroah-Hartman Date: Mon, 27 Aug 2012 17:24:55 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.5.4~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9f400f027d55adfca7deef20f1cd5564a2427d1;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch --- diff --git a/queue-3.4/revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch b/queue-3.4/revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch new file mode 100644 index 00000000000..ba0de9a48f3 --- /dev/null +++ b/queue-3.4/revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch @@ -0,0 +1,96 @@ +From 9ea2c02bafe276e97b592a046ac733610a6d57fd Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +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 +Cc: Javier Martin +Cc: Fabio Estevam +Cc: Sascha Hauer +Cc: Vinod Koul +Signed-off-by: Greg Kroah-Hartman + +--- 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; + } diff --git a/queue-3.4/series b/queue-3.4/series index a281e9439bc..bdabbbf20ce 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -8,3 +8,4 @@ arm-7489-1-errata-fix-workaround-for-erratum-720789-on-up-systems.patch arm-omap2-fix-dmtimer-set-source-clock-failure.patch arm-s3c24xx-add-missing-dmach_dt_prop.patch arm-s3c24xx-fix-s3c2410_dma_enqueue-parameters.patch +revert-dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch