diff mbox

[v6,1/2] Documentation: dma: Add documentation for ZTE DMA

Message ID 20150518100751.GD3140@localhost (mailing list archive)
State Deferred
Headers show

Commit Message

Vinod Koul May 18, 2015, 10:07 a.m. UTC
On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
> This patch adds documentation for the ZTE ZX296702 SoC DMA device
> DTS binding.
> 
Am going to apply this series with following fix:

----------><8------------------

From 2107d71dd49e13741890fcb43ed73c04371a52dd Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul@intel.com>
Date: Mon, 18 May 2015 15:33:13 +0530
Subject: [PATCH] dmaengine: zxdma: explicitly free irq on device removal

At device removal, tasklets are not disabled and irqs are still enabled, so
free the irq explicitly on device removal

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/zx296702_dma.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Vinod Koul May 18, 2015, 10:10 a.m. UTC | #1
On Mon, May 18, 2015 at 03:37:51PM +0530, Vinod Koul wrote:
> On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
> > This patch adds documentation for the ZTE ZX296702 SoC DMA device
> > DTS binding.
> > 
> Am going to apply this series with following fix:

Okay, how do we compile this stuff? I do not see anyconfig for ARCH_ZX

It doesnt even exist today ??
Jun Nie May 18, 2015, 11:55 a.m. UTC | #2
B.R.
Jun


2015-05-18 18:10 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> On Mon, May 18, 2015 at 03:37:51PM +0530, Vinod Koul wrote:
>> On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
>> > This patch adds documentation for the ZTE ZX296702 SoC DMA device
>> > DTS binding.
>> >
>> Am going to apply this series with following fix:
>
> Okay, how do we compile this stuff? I do not see anyconfig for ARCH_ZX
>
> It doesnt even exist today ??
The arch patch set is expected to be merged in this cycle. You can add
compile test or hack Makefile directly for compiling :)
>
> --
> ~Vinod
>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul May 19, 2015, 4:04 a.m. UTC | #3
On Mon, May 18, 2015 at 07:55:47PM +0800, Jun Nie wrote:
> B.R.
> Jun
> 
> 
> 2015-05-18 18:10 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> > On Mon, May 18, 2015 at 03:37:51PM +0530, Vinod Koul wrote:
> >> On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
> >> > This patch adds documentation for the ZTE ZX296702 SoC DMA device
> >> > DTS binding.
> >> >
> >> Am going to apply this series with following fix:
> >
> > Okay, how do we compile this stuff? I do not see anyconfig for ARCH_ZX
> >
> > It doesnt even exist today ??
> The arch patch set is expected to be merged in this cycle. You can add
> compile test or hack Makefile directly for compiling :)
Yes but it will not allow automated tests like 0day kernel, linux-next to
find issue and we do not want to send broken code to Linus

I am thinking of keep it pending till ARCH support is merged and merge it
afterwards...
Jun Nie May 19, 2015, 5:37 a.m. UTC | #4
2015-05-19 12:04 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> On Mon, May 18, 2015 at 07:55:47PM +0800, Jun Nie wrote:
>> B.R.
>> Jun
>>
>>
>> 2015-05-18 18:10 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
>> > On Mon, May 18, 2015 at 03:37:51PM +0530, Vinod Koul wrote:
>> >> On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
>> >> > This patch adds documentation for the ZTE ZX296702 SoC DMA device
>> >> > DTS binding.
>> >> >
>> >> Am going to apply this series with following fix:
>> >
>> > Okay, how do we compile this stuff? I do not see anyconfig for ARCH_ZX
>> >
>> > It doesnt even exist today ??
>> The arch patch set is expected to be merged in this cycle. You can add
>> compile test or hack Makefile directly for compiling :)
> Yes but it will not allow automated tests like 0day kernel, linux-next to
> find issue and we do not want to send broken code to Linus
>
> I am thinking of keep it pending till ARCH support is merged and merge it
> afterwards...
>
> --
> ~Vinod

That's OK if we do not have other acceptable workaround.

Jun
>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul May 21, 2015, 3:52 p.m. UTC | #5
On Tue, May 19, 2015 at 01:37:05PM +0800, Jun Nie wrote:
> 2015-05-19 12:04 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> > On Mon, May 18, 2015 at 07:55:47PM +0800, Jun Nie wrote:
> >> B.R.
> >> Jun
> >>
> >>
> >> 2015-05-18 18:10 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> >> > On Mon, May 18, 2015 at 03:37:51PM +0530, Vinod Koul wrote:
> >> >> On Tue, May 05, 2015 at 10:06:07PM +0800, Jun Nie wrote:
> >> >> > This patch adds documentation for the ZTE ZX296702 SoC DMA device
> >> >> > DTS binding.
> >> >> >
> >> >> Am going to apply this series with following fix:
> >> >
> >> > Okay, how do we compile this stuff? I do not see anyconfig for ARCH_ZX
> >> >
> >> > It doesnt even exist today ??
> >> The arch patch set is expected to be merged in this cycle. You can add
> >> compile test or hack Makefile directly for compiling :)
> > Yes but it will not allow automated tests like 0day kernel, linux-next to
> > find issue and we do not want to send broken code to Linus
> >
> > I am thinking of keep it pending till ARCH support is merged and merge it
> > afterwards...
> >
> > --
> > ~Vinod
> 
> That's OK if we do not have other acceptable workaround.
I didnt hear any other option, so I am pushing this out in a topic branch,
once ARCH support is added, feel free to ping me to get it merged
diff mbox

Patch

diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c
index c99f0d1ac88a..ec470bc74df8 100644
--- a/drivers/dma/zx296702_dma.c
+++ b/drivers/dma/zx296702_dma.c
@@ -127,6 +127,7 @@  struct zx_dma_dev {
 	struct dma_pool		*pool;
 	u32			dma_channels;
 	u32			dma_requests;
+	int 			irq;
 };
 
 #define to_zx_dma(dmadev) container_of(dmadev, struct zx_dma_dev, slave)
@@ -683,7 +684,7 @@  static int zx_dma_probe(struct platform_device *op)
 {
 	struct zx_dma_dev *d;
 	struct resource *iores;
-	int i, ret = 0, irq = 0;
+	int i, ret = 0;
 
 	iores = platform_get_resource(op, IORESOURCE_MEM, 0);
 	if (!iores)
@@ -710,8 +711,8 @@  static int zx_dma_probe(struct platform_device *op)
 		return PTR_ERR(d->clk);
 	}
 
-	irq = platform_get_irq(op, 0);
-	ret = devm_request_irq(&op->dev, irq, zx_dma_int_handler,
+	d->irq = platform_get_irq(op, 0);
+	ret = devm_request_irq(&op->dev, d->irq, zx_dma_int_handler,
 			       0, DRIVER_NAME, d);
 	if (ret)
 		return ret;
@@ -807,6 +808,9 @@  static int zx_dma_remove(struct platform_device *op)
 	struct zx_dma_chan *c, *cn;
 	struct zx_dma_dev *d = platform_get_drvdata(op);
 
+	/* explictly free the irq */
+	devm_free_irq(&op->dev, d->irq, d);
+
 	dma_async_device_unregister(&d->slave);
 	of_dma_controller_free((&op->dev)->of_node);