Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-30 Thread Vinod Koul
On Fri, Apr 26, 2013 at 10:41:23AM +0100, Russell King - ARM Linux wrote: > On Fri, Apr 26, 2013 at 01:46:46PM +0530, Vinod Koul wrote: > > On Fri, Apr 26, 2013 at 10:28:39AM +0200, Linus Walleij wrote: > > > On Thu, Apr 25, 2013 at 4:11 PM, Arnd Bergmann wrote: > > > > > > > The dma engine drive

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Russell King - ARM Linux
On Fri, Apr 26, 2013 at 11:39:20AM +0200, Arnd Bergmann wrote: > On Friday 26 April 2013 13:46:46 Vinod Koul wrote: > > > > The mapping & unmapping of dma buffer (memcpy and memory buffer in this > > txn) is > > required to be performed by the client driver. The dmanegine or dmaengine > > driver

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Russell King - ARM Linux
On Fri, Apr 26, 2013 at 01:46:46PM +0530, Vinod Koul wrote: > On Fri, Apr 26, 2013 at 10:28:39AM +0200, Linus Walleij wrote: > > On Thu, Apr 25, 2013 at 4:11 PM, Arnd Bergmann wrote: > > > > > The dma engine driver must know the address in its dma space, while the > > > slave driver has it availa

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Arnd Bergmann
On Friday 26 April 2013 13:46:46 Vinod Koul wrote: > > The mapping & unmapping of dma buffer (memcpy and memory buffer in this txn) > is > required to be performed by the client driver. The dmanegine or dmaengine > driver > will not do that for you... I've been wondering about this part: since

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Arnd Bergmann
On Friday 26 April 2013 10:28:39 Linus Walleij wrote: > > However this rings a bell that there may be a possible relation to > DMA-API, since that API syncs memory buffers to the DMA > address space if there is some MMU inbetween the DMA and the > (ordinary, non-device) memory. > > So if we think

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Linus Walleij
On Fri, Apr 26, 2013 at 10:16 AM, Vinod Koul wrote: >> OK I could cook a patch for that, but I think I need some input from >> Vinod and/or Russell on this. > the dma_slave_config is physical address that should be passed directly to the > controller. Obviosuly it should phys_addr_t :) OK! Sent

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Vinod Koul
On Fri, Apr 26, 2013 at 10:28:39AM +0200, Linus Walleij wrote: > On Thu, Apr 25, 2013 at 4:11 PM, Arnd Bergmann wrote: > > > The dma engine driver must know the address in its dma space, while the > > slave driver has it available in physical space. These two are often the > > same, but there is

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-26 Thread Linus Walleij
On Thu, Apr 25, 2013 at 4:11 PM, Arnd Bergmann wrote: > The dma engine driver must know the address in its dma space, while the > slave driver has it available in physical space. These two are often the > same, but there is no generic way to convert between the two, especially > if the dma engine

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-25 Thread Arnd Bergmann
On Thursday 25 April 2013, Lee Jones wrote: > > > @@ -232,6 +236,7 @@ struct cryp_dma { > > > */ > > > struct cryp_device_data { > > > struct cryp_register __iomem *base; > > > + phys_addr_t phybase; > > > > Use dma_addr_t. Maybe "phybase" is misleading, > > "dmabase" is probably

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-25 Thread Linus Walleij
On Thu, Apr 25, 2013 at 3:44 PM, Lee Jones wrote: > On Thu, 25 Apr 2013, Linus Walleij wrote: >> On Thu, Apr 18, 2013 at 12:27 PM, Lee Jones wrote: >> >> > The DMA controller currently takes configuration information from >> > information passed though dma_channel_request(), but it shouldn't. >>

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-25 Thread Lee Jones
On Thu, 25 Apr 2013, Linus Walleij wrote: > On Thu, Apr 18, 2013 at 12:27 PM, Lee Jones wrote: > > > The DMA controller currently takes configuration information from > > information passed though dma_channel_request(), but it shouldn't. > > Using the API, the DMA channel should only be configur

Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-25 Thread Linus Walleij
On Thu, Apr 18, 2013 at 12:27 PM, Lee Jones wrote: > The DMA controller currently takes configuration information from > information passed though dma_channel_request(), but it shouldn't. > Using the API, the DMA channel should only be configured during > a dma_slave_config() call. > > Cc: Herber

[PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()

2013-04-18 Thread Lee Jones
The DMA controller currently takes configuration information from information passed though dma_channel_request(), but it shouldn't. Using the API, the DMA channel should only be configured during a dma_slave_config() call. Cc: Herbert Xu Cc: David S. Miller Cc: Andreas Westin Cc: linux-crypto@