Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dmaengine-fix-4.16-rc5' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
"Two small fixes are for this cycle:

- fix max_chunk_size for rcar-dmac for R-Car Gen3

- fix clock resource of mv_xor_v2"

* tag 'dmaengine-fix-4.16-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: mv_xor_v2: Fix clock resource by adding a register clock
dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3

+26 -7
+5 -1
Documentation/devicetree/bindings/dma/mv-xor-v2.txt
··· 11 11 interrupts. 12 12 13 13 Optional properties: 14 - - clocks: Optional reference to the clock used by the XOR engine. 14 + - clocks: Optional reference to the clocks used by the XOR engine. 15 + - clock-names: mandatory if there is a second clock, in this case the 16 + name must be "core" for the first clock and "reg" for the second 17 + one 18 + 15 19 16 20 Example: 17 21
+20 -5
drivers/dma/mv_xor_v2.c
··· 163 163 void __iomem *dma_base; 164 164 void __iomem *glob_base; 165 165 struct clk *clk; 166 + struct clk *reg_clk; 166 167 struct tasklet_struct irq_tasklet; 167 168 struct list_head free_sw_desc; 168 169 struct dma_device dmadev; ··· 750 749 if (ret) 751 750 return ret; 752 751 752 + xor_dev->reg_clk = devm_clk_get(&pdev->dev, "reg"); 753 + if (PTR_ERR(xor_dev->reg_clk) != -ENOENT) { 754 + if (!IS_ERR(xor_dev->reg_clk)) { 755 + ret = clk_prepare_enable(xor_dev->reg_clk); 756 + if (ret) 757 + return ret; 758 + } else { 759 + return PTR_ERR(xor_dev->reg_clk); 760 + } 761 + } 762 + 753 763 xor_dev->clk = devm_clk_get(&pdev->dev, NULL); 754 - if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) 755 - return -EPROBE_DEFER; 764 + if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) { 765 + ret = EPROBE_DEFER; 766 + goto disable_reg_clk; 767 + } 756 768 if (!IS_ERR(xor_dev->clk)) { 757 769 ret = clk_prepare_enable(xor_dev->clk); 758 770 if (ret) 759 - return ret; 771 + goto disable_reg_clk; 760 772 } 761 773 762 774 ret = platform_msi_domain_alloc_irqs(&pdev->dev, 1, ··· 880 866 free_msi_irqs: 881 867 platform_msi_domain_free_irqs(&pdev->dev); 882 868 disable_clk: 883 - if (!IS_ERR(xor_dev->clk)) 884 - clk_disable_unprepare(xor_dev->clk); 869 + clk_disable_unprepare(xor_dev->clk); 870 + disable_reg_clk: 871 + clk_disable_unprepare(xor_dev->reg_clk); 885 872 return ret; 886 873 } 887 874
+1 -1
drivers/dma/sh/rcar-dmac.c
··· 917 917 918 918 rcar_dmac_chan_configure_desc(chan, desc); 919 919 920 - max_chunk_size = (RCAR_DMATCR_MASK + 1) << desc->xfer_shift; 920 + max_chunk_size = RCAR_DMATCR_MASK << desc->xfer_shift; 921 921 922 922 /* 923 923 * Allocate and fill the transfer chunk descriptors. We own the only