linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND v2] dmaengine: pxa: add a default requestor policy
@ 2018-05-30 20:12 Robert Jarzmik
  2018-06-09 12:43 ` Robert Jarzmik
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2018-05-30 20:12 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Vinod Koul, Vinod Koul
  Cc: linux-arm-kernel, dmaengine, linux-kernel, Arnd Bergmann

As what former drcmr -1 value meant, add a this as a default to each
channel, ie. that by default no requestor line is used.

This is specifically used for network drivers smc91x and smc911x, and
needed for their port to slave maps.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
Since v1: changed -1 to U32_MAX
---
 drivers/dma/pxa_dma.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index 9505334f9c6e..b31c28b67ad3 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -762,6 +762,8 @@ static void pxad_free_chan_resources(struct dma_chan *dchan)
 	dma_pool_destroy(chan->desc_pool);
 	chan->desc_pool = NULL;
 
+	chan->drcmr = U32_MAX;
+	chan->prio = PXAD_PRIO_LOWEST;
 }
 
 static void pxad_free_desc(struct virt_dma_desc *vd)
@@ -1386,6 +1388,9 @@ static int pxad_init_dmadev(struct platform_device *op,
 		c = devm_kzalloc(&op->dev, sizeof(*c), GFP_KERNEL);
 		if (!c)
 			return -ENOMEM;
+
+		c->drcmr = U32_MAX;
+		c->prio = PXAD_PRIO_LOWEST;
 		c->vc.desc_free = pxad_free_desc;
 		vchan_init(&c->vc, &pdev->slave);
 		init_waitqueue_head(&c->wq_state);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RESEND v2] dmaengine: pxa: add a default requestor policy
  2018-05-30 20:12 [RESEND v2] dmaengine: pxa: add a default requestor policy Robert Jarzmik
@ 2018-06-09 12:43 ` Robert Jarzmik
  2018-06-11  4:21   ` Vinod Koul
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2018-06-09 12:43 UTC (permalink / raw)
  To: Vinod Koul, Daniel Mack
  Cc: Haojian Zhuang, Vinod Koul, linux-arm-kernel, dmaengine,
	linux-kernel, Arnd Bergmann

Robert Jarzmik <robert.jarzmik@free.fr> writes:

> As what former drcmr -1 value meant, add a this as a default to each
> channel, ie. that by default no requestor line is used.
>
> This is specifically used for network drivers smc91x and smc911x, and
> needed for their port to slave maps.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> ---
> Since v1: changed -1 to U32_MAX
Hi Vinod,

Could I have your ack on this so that I add this one to the dma slave map serie
after the merge window is closed please ?

Cheers.

--
Robert

> ---
>  drivers/dma/pxa_dma.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
> index 9505334f9c6e..b31c28b67ad3 100644
> --- a/drivers/dma/pxa_dma.c
> +++ b/drivers/dma/pxa_dma.c
> @@ -762,6 +762,8 @@ static void pxad_free_chan_resources(struct dma_chan *dchan)
>  	dma_pool_destroy(chan->desc_pool);
>  	chan->desc_pool = NULL;
>  
> +	chan->drcmr = U32_MAX;
> +	chan->prio = PXAD_PRIO_LOWEST;
>  }
>  
>  static void pxad_free_desc(struct virt_dma_desc *vd)
> @@ -1386,6 +1388,9 @@ static int pxad_init_dmadev(struct platform_device *op,
>  		c = devm_kzalloc(&op->dev, sizeof(*c), GFP_KERNEL);
>  		if (!c)
>  			return -ENOMEM;
> +
> +		c->drcmr = U32_MAX;
> +		c->prio = PXAD_PRIO_LOWEST;
>  		c->vc.desc_free = pxad_free_desc;
>  		vchan_init(&c->vc, &pdev->slave);
>  		init_waitqueue_head(&c->wq_state);

-- 
Robert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND v2] dmaengine: pxa: add a default requestor policy
  2018-06-09 12:43 ` Robert Jarzmik
@ 2018-06-11  4:21   ` Vinod Koul
  2018-06-11 19:54     ` Robert Jarzmik
  0 siblings, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2018-06-11  4:21 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Daniel Mack, Haojian Zhuang, Vinod Koul, linux-arm-kernel,
	dmaengine, linux-kernel, Arnd Bergmann

On 09-06-18, 14:43, Robert Jarzmik wrote:
> Robert Jarzmik <robert.jarzmik@free.fr> writes:
> 
> > As what former drcmr -1 value meant, add a this as a default to each
> > channel, ie. that by default no requestor line is used.
> >
> > This is specifically used for network drivers smc91x and smc911x, and
> > needed for their port to slave maps.
> >
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> > ---
> > Since v1: changed -1 to U32_MAX
> Hi Vinod,
> 
> Could I have your ack on this so that I add this one to the dma slave map serie
> after the merge window is closed please ?

Sorry I was thinking it would go thru dmaengine tree, please do
indicate if that is not the case. Nevertheless

Acked-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND v2] dmaengine: pxa: add a default requestor policy
  2018-06-11  4:21   ` Vinod Koul
@ 2018-06-11 19:54     ` Robert Jarzmik
  2018-06-12  4:02       ` Vinod Koul
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2018-06-11 19:54 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Daniel Mack, Haojian Zhuang, Vinod Koul, linux-arm-kernel,
	dmaengine, linux-kernel, Arnd Bergmann

Vinod Koul <vinod.koul@linaro.org> writes:

> On 09-06-18, 14:43, Robert Jarzmik wrote:
>> Robert Jarzmik <robert.jarzmik@free.fr> writes:
>> 
>> > As what former drcmr -1 value meant, add a this as a default to each
>> > channel, ie. that by default no requestor line is used.
>> >
>> > This is specifically used for network drivers smc91x and smc911x, and
>> > needed for their port to slave maps.
>> >
>> > Cc: Arnd Bergmann <arnd@arndb.de>
>> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>> > ---
>> > Since v1: changed -1 to U32_MAX
>> Hi Vinod,
>> 
>> Could I have your ack on this so that I add this one to the dma slave map serie
>> after the merge window is closed please ?
>
> Sorry I was thinking it would go thru dmaengine tree, please do
> indicate if that is not the case. Nevertheless
>
> Acked-by: Vinod Koul <vkoul@kernel.org>
Thanks.

As this is a dependency to the serie, I'd rather take it, unless you insist, in
which case I'll rely on the fact that it will hit 4.19 cycle.

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND v2] dmaengine: pxa: add a default requestor policy
  2018-06-11 19:54     ` Robert Jarzmik
@ 2018-06-12  4:02       ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2018-06-12  4:02 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Daniel Mack, Haojian Zhuang, Vinod Koul, linux-arm-kernel,
	dmaengine, linux-kernel, Arnd Bergmann

On 11-06-18, 21:54, Robert Jarzmik wrote:
> Vinod Koul <vinod.koul@linaro.org> writes:
> 
> > On 09-06-18, 14:43, Robert Jarzmik wrote:
> >> Robert Jarzmik <robert.jarzmik@free.fr> writes:
> >> 
> >> > As what former drcmr -1 value meant, add a this as a default to each
> >> > channel, ie. that by default no requestor line is used.
> >> >
> >> > This is specifically used for network drivers smc91x and smc911x, and
> >> > needed for their port to slave maps.
> >> >
> >> > Cc: Arnd Bergmann <arnd@arndb.de>
> >> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> >> > ---
> >> > Since v1: changed -1 to U32_MAX
> >> Hi Vinod,
> >> 
> >> Could I have your ack on this so that I add this one to the dma slave map serie
> >> after the merge window is closed please ?
> >
> > Sorry I was thinking it would go thru dmaengine tree, please do
> > indicate if that is not the case. Nevertheless
> >
> > Acked-by: Vinod Koul <vkoul@kernel.org>
> Thanks.
> 
> As this is a dependency to the serie, I'd rather take it, unless you insist, in
> which case I'll rely on the fact that it will hit 4.19 cycle.

It fine if you take, just that it helps to indicate the route to take
for a patch :)

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-12  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 20:12 [RESEND v2] dmaengine: pxa: add a default requestor policy Robert Jarzmik
2018-06-09 12:43 ` Robert Jarzmik
2018-06-11  4:21   ` Vinod Koul
2018-06-11 19:54     ` Robert Jarzmik
2018-06-12  4:02       ` 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).