Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-12-24 Thread Gene Anderson
Group: This is a request to augment with comments the DREQ explanation in the Broadcom BCM2835 pdf on page 61 regarding DMA peripheral mapping. Specifically, how to identify a pin on the 26 pin header to use for DMA reads. More specifically, if a clock signal, like GPCLK0 is output to

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-12-24 Thread Gene Anderson
Group: This is a request to augment with comments the DREQ explanation in the Broadcom BCM2835 pdf on page 61 regarding DMA peripheral mapping. Specifically, how to identify a pin on the 26 pin header to use for DMA reads. More specifically, if a clock signal, like GPCLK0 is output to

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Mark Brown
On Sat, Nov 16, 2013 at 11:41:34AM +, Russell King - ARM Linux wrote: > On Sat, Nov 16, 2013 at 11:27:54AM +, Mark Brown wrote: > > We should in general be moving in that direction however it does need a > > bit of care to make sure that there aren't any dependencies which do > > things

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Russell King - ARM Linux
On Sat, Nov 16, 2013 at 11:27:54AM +, Mark Brown wrote: > On Sat, Nov 16, 2013 at 11:37:54AM +0200, Andy Shevchenko wrote: > > > The reason why I was asking about I'm just wondering what we have to do > > with existing drivers. Shall we convert them to be initialized as normal > > platform

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Mark Brown
On Sat, Nov 16, 2013 at 11:37:54AM +0200, Andy Shevchenko wrote: > The reason why I was asking about I'm just wondering what we have to do > with existing drivers. Shall we convert them to be initialized as normal > platform drivers instead of subsys_initcall? We should in general be moving in

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Andy Shevchenko
> On Fri, Nov 15, 2013 at 7:51 PM, Russell King - ARM Linux > wrote: >> >> On Fri, Nov 15, 2013 at 05:43:45PM +, Shevchenko, Andriy wrote: >> >> > > +module_platform_driver(bcm2835_dma_driver); >> > >> > Is it possible to get driver initialized after that one that uses it? >> >> Doesn't

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Andy Shevchenko
On Fri, Nov 15, 2013 at 7:51 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Nov 15, 2013 at 05:43:45PM +, Shevchenko, Andriy wrote: +module_platform_driver(bcm2835_dma_driver); Is it possible to get driver initialized after that one that uses it? Doesn't

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Mark Brown
On Sat, Nov 16, 2013 at 11:37:54AM +0200, Andy Shevchenko wrote: The reason why I was asking about I'm just wondering what we have to do with existing drivers. Shall we convert them to be initialized as normal platform drivers instead of subsys_initcall? We should in general be moving in that

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Russell King - ARM Linux
On Sat, Nov 16, 2013 at 11:27:54AM +, Mark Brown wrote: On Sat, Nov 16, 2013 at 11:37:54AM +0200, Andy Shevchenko wrote: The reason why I was asking about I'm just wondering what we have to do with existing drivers. Shall we convert them to be initialized as normal platform drivers

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-16 Thread Mark Brown
On Sat, Nov 16, 2013 at 11:41:34AM +, Russell King - ARM Linux wrote: On Sat, Nov 16, 2013 at 11:27:54AM +, Mark Brown wrote: We should in general be moving in that direction however it does need a bit of care to make sure that there aren't any dependencies which do things like

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Joe Perches
On Fri, 2013-11-15 at 17:43 +, Russell King - ARM Linux wrote: > On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote: > > On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: > > > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, > > > dma_addr_t addr) > > > +{ > >

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Russell King - ARM Linux
On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote: > On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: > > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t > > addr) > > +{ > > + unsigned i; > > + size_t size; > > Please set size to 0 here and not

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Russell King - ARM Linux
On Fri, Nov 15, 2013 at 05:43:45PM +, Shevchenko, Andriy wrote: > On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: > > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t > > addr) > > +{ > > + unsigned i; > > + size_t size; > > size = 0 here is better.

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Shevchenko, Andriy
On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: > Add support for DMA controller of BCM2835 as used in the Raspberry Pi. > Currently it only supports cyclic DMA. Few comments below. > +++ b/drivers/dma/bcm2835-dma.c > @@ -0,0 +1,749 @@ > +/* > + * BCM2835 DMA engine support > + * > + *

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Joe Perches
On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: > Add support for DMA controller of BCM2835 as used in the Raspberry Pi. > Currently it only supports cyclic DMA. trivial style notes: > diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c [] > +/* DMA CS Control and Status

[PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Florian Meier
Add support for DMA controller of BCM2835 as used in the Raspberry Pi. Currently it only supports cyclic DMA. Signed-off-by: Florian Meier --- Fifth version with better error handling in probe. .../devicetree/bindings/dma/bcm2835-dma.txt| 56 ++ drivers/dma/Kconfig

[PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Florian Meier
Add support for DMA controller of BCM2835 as used in the Raspberry Pi. Currently it only supports cyclic DMA. Signed-off-by: Florian Meier florian.me...@koalo.de --- Fifth version with better error handling in probe. .../devicetree/bindings/dma/bcm2835-dma.txt| 56 ++

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Joe Perches
On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: Add support for DMA controller of BCM2835 as used in the Raspberry Pi. Currently it only supports cyclic DMA. trivial style notes: diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c [] +/* DMA CS Control and Status bits

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Shevchenko, Andriy
On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: Add support for DMA controller of BCM2835 as used in the Raspberry Pi. Currently it only supports cyclic DMA. Few comments below. +++ b/drivers/dma/bcm2835-dma.c @@ -0,0 +1,749 @@ +/* + * BCM2835 DMA engine support + * + * This

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Russell King - ARM Linux
On Fri, Nov 15, 2013 at 05:43:45PM +, Shevchenko, Andriy wrote: On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr) +{ + unsigned i; + size_t size; size = 0 here is better. See my other

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Russell King - ARM Linux
On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote: On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr) +{ + unsigned i; + size_t size; Please set size to 0 here and not in the for

Re: [PATCHv5] dmaengine: Add support for BCM2835

2013-11-15 Thread Joe Perches
On Fri, 2013-11-15 at 17:43 +, Russell King - ARM Linux wrote: On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote: On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote: +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr) +{ + unsigned i;