dmaengine: mv_xor_v2: Fix clock resource by adding a register clock
Hi Vinod,
Quoted 52 lines · Vinod Koul
Pls do CC DT folks and Rob for bindings update
Quoted 1 line · Gregory CLEMENT
On the CP110 components whic are present on the Armada 7K/8K SoC we need
/s/whic/which
Quoted 1 line
to explicitly enable the registers clock. However it is not needed for
/s/registers/register
Quoted 41 lines
the AP8xx componenet, that's why this clock is optional.
Signed-off-by Gregory CLEMENT <[email protected]>--- .../devicetree/bindings/dma/mv-xor-v2.txt | 6 +++++- drivers/dma/mv_xor_v2.c | 23 +++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-)Documentation/devicetree/bindings/dma/mv-xor-v2.txt +5
-1@@ -11,7 +11,11 @@ Required properties: interrupts. Optional properties: -- clocks: Optional reference to the clock used by the XOR engine. +- clocks: Optional reference to the clocks used by the XOR engine. +- clock-names: mandatory if there is a second clock, in this case the + name must be "core" for the first clock and "reg" for the second + one + Example:drivers/dma/mv_xor_v2.c +1
-0@@ -163,6 +163,7 @@ struct mv_xor_v2_device {void __iomem *dma_base;void __iomem *glob_base;struct clk *clk; +struct clk *reg_clk;struct tasklet_struct irq_tasklet;struct list_head free_sw_desc;struct dma_device dmadev;@@ -749,13 +750,24 @@ static int mv_xor_v2_probe(struct platform_device *pdev)if (ret)return ret;
Quoted 5 lines
drivers/dma/mv_xor_v2.c static int mv_xor_v2_probe(struct platform_device *pdev) · line 753
Quoted 3 lines
drivers/dma/mv_xor_v2.c +1
-2- xor_dev->clk =devm_clk_get (&pdev->dev,NULL ); -if (IS_ERR (xor_dev->clk) &&PTR_ERR (xor_dev->clk) == -EPROBE_DEFER ) + xor_dev->reg_clk =devm_clk_get (&pdev->dev,"reg" );is this an exiting property?
It is the name of the new optional clock described in the first part of this patch.
About the typo, do you need a new version or do you plan to fix them while applying the patch?
Thanks,
Gregory
Quoted 44 lines
Quoted 37 lines
drivers/dma/mv_xor_v2.c +16
-3+if (!IS_ERR (xor_dev->reg_clk)) { + ret =clk_prepare_enable (xor_dev->reg_clk); +if (ret) +return ret; + }else if (PTR_ERR (xor_dev->reg_clk) == -EPROBE_DEFER ) {return -EPROBE_DEFER ; + } + + xor_dev->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (xor_dev->clk) &&PTR_ERR (xor_dev->clk) == -EPROBE_DEFER ) { + ret =EPROBE_DEFER ; + goto disable_reg_clk; + }if (!IS_ERR (xor_dev->clk)) { ret =clk_prepare_enable (xor_dev->clk);if (ret) -return ret; + goto disable_reg_clk; } ret = platform_msi_domain_alloc_irqs(&pdev->dev, 1,@@ -866,8 +878,9 @@ static int mv_xor_v2_probe(struct platform_device *pdev) free_msi_irqs:platform_msi_domain_free_irqs (&pdev->dev); disable_clk: -if (!IS_ERR (xor_dev->clk)) -clk_disable_unprepare (xor_dev->clk); +clk_disable_unprepare (xor_dev->clk); +disable_reg_clk: +clk_disable_unprepare (xor_dev->reg_clk);return ret; }Signature · 1 line
2.15.1Signature · 5 lines
~Vinod -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html