Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 20:11, Shevchenko, Andriy wrote: > On Fri, 2012-10-12 at 19:36 +0530, Viresh Kumar wrote: > I meant is to use that constant instead of hard coding 4 everywhere. > It's a maximum value, not the SoC specific. Can be done. >> + u32 val, arr[4]; > what about to use tmp name in

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Shevchenko, Andriy
On Fri, 2012-10-12 at 19:36 +0530, Viresh Kumar wrote: > On 12 October 2012 18:58, Shevchenko, Andriy > wrote: > > On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > > >> + if (!of_property_read_u32(np, "nr_masters", &val)) { > >> + if (val > 4) > > I thought once that we m

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 18:58, Shevchenko, Andriy wrote: > On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: >> + if (!of_property_read_u32(np, "chan_allocation_order", >> + &val)) > Fits one line? yes. >> + pdata->chan_allocation_order = (unsigned ch

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 16:55, Andy Shevchenko wrote: >> EXPORT_SYMBOL(dw_generic_filter); > Could we change a name to be more precise, like dw_dma_generic_filter ? Sure. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Shevchenko, Andriy
On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > dw_dmac driver already supports device tree but it used to have its platform > data passed the non-DT way. Another portion of comments. > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > +static struct dw_dma_platform_data * >

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > dw_dmac driver already supports device tree but it used to have its platform > data passed the non-DT way. Another portion of comments. > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > +static struct dw_dma_platform_data * >

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 2:01 PM, Viresh Kumar wrote: > On 12 October 2012 16:10, Andy Shevchenko wrote: > + if (!found) { > + last_dw = dw; > + last_bus_id = param; > + return false; Because of return here you could eliminate 'found' fl

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 16:10, Andy Shevchenko wrote: + if (!found) { + last_dw = dw; + last_bus_id = param; + return false; >>> Because of return here you could eliminate 'found' flag at all. Here is the stuff copied from you ;) diff --git

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 16:10, Andy Shevchenko wrote: > On Fri, Oct 12, 2012 at 1:36 PM, viresh kumar wrote: >> On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko >> wrote: >>> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: >> + while (++i < dw->sd_count) { + if (!strc

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 1:36 PM, viresh kumar wrote: > On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko > wrote: >> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > >>> + while (++i < dw->sd_count) { >>> + if (!strcmp(dw->sd[i].bus_id, param)) { >>> + f

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread viresh kumar
On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko wrote: > On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: >> + while (++i < dw->sd_count) { >> + if (!strcmp(dw->sd[i].bus_id, param)) { >> + found = 1; >> + break; >> + } >>

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 14:55, Andy Shevchenko wrote: > I understand your way of allocating memory, but what about using > linked list instead of array? I gave it a thought. Overhead was 4 bytes more per slave structure + more cycles in filter routine (arrays are more faster :) ). Because the DT cap

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 11:34 AM, Viresh Kumar wrote: > On 12 October 2012 13:53, Andy Shevchenko > wrote: >> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: >>> diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt >>> b/Documentation/devicetree/bindings/dma/snps-dma.txt >>> @

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 13:53, Andy Shevchenko wrote: > On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > My few comments are below. Most welcome :) >> diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt >> b/Documentation/devicetree/bindings/dma/snps-dma.txt >> @@ -14,4 +34,28 @

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > dw_dmac driver already supports device tree but it used to have its platform > data passed the non-DT way. My few comments are below. > > This patch does following changes: > - pass platform data via DT, non-DT way still takes precedence

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-11 Thread viresh kumar
On Fri, Oct 12, 2012 at 11:14 AM, Viresh Kumar wrote: > dw_dmac driver already supports device tree but it used to have its platform > data passed the non-DT way. > > This patch does following changes: > - pass platform data via DT, non-DT way still takes precedence if both are > used. > - create

[PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-11 Thread Viresh Kumar
dw_dmac driver already supports device tree but it used to have its platform data passed the non-DT way. This patch does following changes: - pass platform data via DT, non-DT way still takes precedence if both are used. - create generic filter routine - Earlier slave information was made availabl