* [PATCH v2 0/2] xilinx_dma: Add external reset control @ 2017-03-06 12:17 Ramiro Oliveira [not found] ` <cover.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 2017-03-06 12:17 ` [PATCH v2 2/2] dma: xilinx: Add reset support Ramiro Oliveira 0 siblings, 2 replies; 5+ messages in thread From: Ramiro Oliveira @ 2017-03-06 12:17 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA, dmaengine-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Cc: CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w, Ramiro Oliveira, Dan Williams, Kedareswara rao Appana, Laurent Pinchart, Mark Rutland, Michal Simek, Rob Herring, Sören Brinkmann, Vinod Koul This patchset adds support for controlling an external reset line. Since this reset line is optional it won't break compatibility. v2: - Re-order headers - Remove deprecated function - Remove reset naming Ramiro Oliveira (2): dma: xilinx: Edit device tree bindings documentation dma: xilinx: Add reset support .../devicetree/bindings/dma/xilinx/xilinx_dma.txt | 2 ++ drivers/dma/xilinx/xilinx_dma.c | 24 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <cover.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>]
* [PATCH v2 1/2] dma: xilinx: Edit device tree bindings documentation [not found] ` <cover.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> @ 2017-03-06 12:17 ` Ramiro Oliveira 2017-03-15 16:47 ` Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Ramiro Oliveira @ 2017-03-06 12:17 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA, dmaengine-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Cc: CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w, Ramiro Oliveira, Anurag Kumar Vulisha, Dan Williams, Kedareswara rao Appana, Laurent Pinchart, Mark Rutland, Michal Simek, Rob Herring, Sören Brinkmann, Vinod Koul Add reset property documentation for Xilinx DMA Signed-off-by: Ramiro Oliveira <roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> --- Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt index a2b8bfaec43c..96c469a4717f 100644 --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt @@ -40,6 +40,7 @@ Required properties for VDMA: Optional properties: - xlnx,include-sg: Tells configured for Scatter-mode in the hardware. +- resets : External reset specifier. See ../../reset/reset.txt for details. Optional properties for AXI DMA: - xlnx,mcdma: Tells whether configured for multi-channel mode in the hardware. Optional properties for VDMA: @@ -83,6 +84,7 @@ axi_vdma_0: axivdma@40030000 { clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>; clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk", "m_axis_mm2s_aclk", "s_axis_s2mm_aclk"; + resets = <&rst 2>; dma-channel@40030000 { compatible = "xlnx,axi-vdma-mm2s-channel"; interrupts = < 0 54 4 >; -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dma: xilinx: Edit device tree bindings documentation 2017-03-06 12:17 ` [PATCH v2 1/2] dma: xilinx: Edit device tree bindings documentation Ramiro Oliveira @ 2017-03-15 16:47 ` Rob Herring 0 siblings, 0 replies; 5+ messages in thread From: Rob Herring @ 2017-03-15 16:47 UTC (permalink / raw) To: Ramiro Oliveira Cc: Mark Rutland, devicetree, Vinod Koul, Anurag Kumar Vulisha, linux-kernel, CARLOS.PALMINHA, Sören Brinkmann, Laurent Pinchart, Kedareswara rao Appana, dmaengine, Dan Williams, Michal Simek, linux-arm-kernel On Mon, Mar 06, 2017 at 12:17:38PM +0000, Ramiro Oliveira wrote: > Add reset property documentation for Xilinx DMA > > Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com> > --- > Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt | 2 ++ > 1 file changed, 2 insertions(+) Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] dma: xilinx: Add reset support 2017-03-06 12:17 [PATCH v2 0/2] xilinx_dma: Add external reset control Ramiro Oliveira [not found] ` <cover.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> @ 2017-03-06 12:17 ` Ramiro Oliveira [not found] ` <f7e00cde86aebcc5a0e85ea67ec96f27544acc82.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Ramiro Oliveira @ 2017-03-06 12:17 UTC (permalink / raw) To: linux-kernel, dmaengine, devicetree, linux-arm-kernel Cc: CARLOS.PALMINHA, Ramiro Oliveira, Dan Williams, Kedareswara rao Appana, Laurent Pinchart, Mark Rutland, Michal Simek, Rob Herring, Sören Brinkmann, Vinod Koul Add a DT property to control an optional external reset line Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com> --- drivers/dma/xilinx/xilinx_dma.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 5c9f11b623ca..589cbb611bc8 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -32,20 +32,21 @@ */ #include <linux/bitops.h> -#include <linux/dmapool.h> +#include <linux/clk.h> #include <linux/dma/xilinx_dma.h> +#include <linux/dmapool.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/io-64-nonatomic-lo-hi.h> #include <linux/io.h> #include <linux/iopoll.h> #include <linux/module.h> #include <linux/of_address.h> #include <linux/of_dma.h> -#include <linux/of_platform.h> #include <linux/of_irq.h> +#include <linux/of_platform.h> +#include <linux/reset.h> #include <linux/slab.h> -#include <linux/clk.h> -#include <linux/io-64-nonatomic-lo-hi.h> #include "../dmaengine.h" @@ -409,6 +410,7 @@ struct xilinx_dma_device { struct clk *rxs_clk; u32 nr_channels; u32 chan_id; + struct reset_control *rst; }; /* Macros */ @@ -2543,6 +2545,20 @@ static int xilinx_dma_probe(struct platform_device *pdev) if (IS_ERR(xdev->regs)) return PTR_ERR(xdev->regs); + xdev->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL); + if (IS_ERR(xdev->rst)) { + err = PTR_ERR(xdev->rst); + if (err == -EPROBE_DEFER) + return err; + xdev->rst = NULL; + } else { + err = reset_control_deassert(xdev->rst); + if (err) { + dev_err(xdev->dev, "error deasserting reset %d\n", err); + return err; + } + } + /* Retrieve the DMA engine properties from the device tree */ xdev->has_sg = of_property_read_bool(node, "xlnx,include-sg"); if (xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) -- 2.11.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <f7e00cde86aebcc5a0e85ea67ec96f27544acc82.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH v2 2/2] dma: xilinx: Add reset support [not found] ` <f7e00cde86aebcc5a0e85ea67ec96f27544acc82.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> @ 2017-03-14 3:38 ` Vinod Koul 0 siblings, 0 replies; 5+ messages in thread From: Vinod Koul @ 2017-03-14 3:38 UTC (permalink / raw) To: Ramiro Oliveira Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, dmaengine-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w, Dan Williams, Kedareswara rao Appana, Laurent Pinchart, Mark Rutland, Michal Simek, Rob Herring, Sören Brinkmann On Mon, Mar 06, 2017 at 12:17:39PM +0000, Ramiro Oliveira wrote: > Add a DT property to control an optional external reset line > > Signed-off-by: Ramiro Oliveira <roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> > --- > drivers/dma/xilinx/xilinx_dma.c | 24 ++++++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) > > diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c > index 5c9f11b623ca..589cbb611bc8 100644 > --- a/drivers/dma/xilinx/xilinx_dma.c > +++ b/drivers/dma/xilinx/xilinx_dma.c > @@ -32,20 +32,21 @@ > */ > > #include <linux/bitops.h> > -#include <linux/dmapool.h> > +#include <linux/clk.h> > #include <linux/dma/xilinx_dma.h> > +#include <linux/dmapool.h> > #include <linux/init.h> > #include <linux/interrupt.h> > +#include <linux/io-64-nonatomic-lo-hi.h> > #include <linux/io.h> > #include <linux/iopoll.h> > #include <linux/module.h> > #include <linux/of_address.h> > #include <linux/of_dma.h> > -#include <linux/of_platform.h> > #include <linux/of_irq.h> > +#include <linux/of_platform.h> > +#include <linux/reset.h> > #include <linux/slab.h> > -#include <linux/clk.h> > -#include <linux/io-64-nonatomic-lo-hi.h> this is noise in the patch, if you want to change the order feel free to send a separate patch > > #include "../dmaengine.h" > > @@ -409,6 +410,7 @@ struct xilinx_dma_device { > struct clk *rxs_clk; > u32 nr_channels; > u32 chan_id; > + struct reset_control *rst; > }; > > /* Macros */ > @@ -2543,6 +2545,20 @@ static int xilinx_dma_probe(struct platform_device *pdev) > if (IS_ERR(xdev->regs)) > return PTR_ERR(xdev->regs); > > + xdev->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + if (IS_ERR(xdev->rst)) { > + err = PTR_ERR(xdev->rst); > + if (err == -EPROBE_DEFER) > + return err; > + xdev->rst = NULL; is this optional, how will it work if you can't bring device out if reset > + } else { > + err = reset_control_deassert(xdev->rst); > + if (err) { > + dev_err(xdev->dev, "error deasserting reset %d\n", err); > + return err; > + } > + } > + > /* Retrieve the DMA engine properties from the device tree */ > xdev->has_sg = of_property_read_bool(node, "xlnx,include-sg"); > if (xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) > -- > 2.11.0 > > -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-15 16:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-06 12:17 [PATCH v2 0/2] xilinx_dma: Add external reset control Ramiro Oliveira [not found] ` <cover.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 2017-03-06 12:17 ` [PATCH v2 1/2] dma: xilinx: Edit device tree bindings documentation Ramiro Oliveira 2017-03-15 16:47 ` Rob Herring 2017-03-06 12:17 ` [PATCH v2 2/2] dma: xilinx: Add reset support Ramiro Oliveira [not found] ` <f7e00cde86aebcc5a0e85ea67ec96f27544acc82.1488801913.git.roliveir-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 2017-03-14 3:38 ` Vinod Koul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).