aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 22:10:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 22:10:41 -0400
commitb7e97d22113bcaafff93774e3085f5b567eaba9c (patch)
tree1d3a13574310bde064fceb4408cf91a44c59c078 /drivers/dma/ste_dma40.c
parent943c2acea53784c45fb291498d04d5188fdea891 (diff)
parentd0fc905429f7f5f3ad365466669c55b04b92c1e5 (diff)
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine updates from Vinod Koul: "This time we have Andy updates on dw_dmac which is attempting to make this IP block available as PCI and platform device though not fully complete this time. We also have TI EDMA moving the dma driver to use dmaengine APIs, also have a new driver for mmp-tdma, along with bunch of small updates. Now for your excitement the merge is little unusual here, while merging the auto merge on linux-next picks wrong choice for pl330 (drivers/dma/pl330.c) and this causes build failure. The correct resolution is in linux-next. (DMA: PL330: Fix build error) I didn't back merge your tree this time as you are better than me so no point in doing that for me :)" Fixed the pl330 conflict as in linux-next, along with trivial header file conflicts due to changed includes. * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits) dma: tegra: fix interrupt name issue with apb dma. dw_dmac: fix a regression in dwc_prep_dma_memcpy dw_dmac: introduce software emulation of LLP transfers dw_dmac: autoconfigure data_width or get it via platform data dw_dmac: autoconfigure block_size or use platform data dw_dmac: get number of channels from hardware if possible dw_dmac: fill optional encoded parameters in register structure dw_dmac: mark dwc_dump_chan_regs as inline DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources DMA: PL330: Remove redundant runtime_suspend/resume functions DMA: PL330: Remove controller clock enable/disable dmaengine: use kmem_cache_zalloc instead of kmem_cache_alloc/memset DMA: PL330: Set the capability of pdm0 and pdm1 as DMA_PRIVATE ARM: EXYNOS: Set the capability of pdm0 and pdm1 as DMA_PRIVATE dma: tegra: use list_move_tail instead of list_del/list_add_tail mxs/dma: Enlarge the CCW descriptor area to 4 pages dw_dmac: utilize slave_id to pass request line dmaengine: mmp_tdma: add dt support dmaengine: mmp-pdma support spi: davici - make davinci select edma ...
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index eee8d9b9a20b..ae55091c2272 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2921,19 +2921,23 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev)
2921 struct d40_base *base = NULL; 2921 struct d40_base *base = NULL;
2922 int num_log_chans = 0; 2922 int num_log_chans = 0;
2923 int num_phy_chans; 2923 int num_phy_chans;
2924 int clk_ret = -EINVAL;
2924 int i; 2925 int i;
2925 u32 pid; 2926 u32 pid;
2926 u32 cid; 2927 u32 cid;
2927 u8 rev; 2928 u8 rev;
2928 2929
2929 clk = clk_get(&pdev->dev, NULL); 2930 clk = clk_get(&pdev->dev, NULL);
2930
2931 if (IS_ERR(clk)) { 2931 if (IS_ERR(clk)) {
2932 d40_err(&pdev->dev, "No matching clock found\n"); 2932 d40_err(&pdev->dev, "No matching clock found\n");
2933 goto failure; 2933 goto failure;
2934 } 2934 }
2935 2935
2936 clk_enable(clk); 2936 clk_ret = clk_prepare_enable(clk);
2937 if (clk_ret) {
2938 d40_err(&pdev->dev, "Failed to prepare/enable clock\n");
2939 goto failure;
2940 }
2937 2941
2938 /* Get IO for DMAC base address */ 2942 /* Get IO for DMAC base address */
2939 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "base"); 2943 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "base");
@@ -3063,10 +3067,10 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev)
3063 return base; 3067 return base;
3064 3068
3065failure: 3069failure:
3066 if (!IS_ERR(clk)) { 3070 if (!clk_ret)
3067 clk_disable(clk); 3071 clk_disable_unprepare(clk);
3072 if (!IS_ERR(clk))
3068 clk_put(clk); 3073 clk_put(clk);
3069 }
3070 if (virtbase) 3074 if (virtbase)
3071 iounmap(virtbase); 3075 iounmap(virtbase);
3072 if (res) 3076 if (res)