Re: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Arnd Bergmann
On Tuesday 23 September 2014 17:18:43 Jingchang Lu wrote: > I will reconsider this setting. BTW, why writel() can't be used > for memory location since it's still mapped and registers space is > also memory mapped? Thanks. You cannot rely on an '__iomem' token to actually be a pointer, even if tha

Re: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Jingchang Lu
-edma: fixup reg offset and hw S/G support in big-endian model On Tue, Sep 23, 2014 at 05:15:19PM +0800, Jingchang Lu wrote: > static u16 edma_readw(struct fsl_edma_engine *edma, void __iomem *addr) > { > - if (edma->big_endian) > - return ioread16be(addr); > -

Re: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Jingchang Lu
reg offset and hw S/G support in big-endian model On Tuesday 23 September 2014 17:15:19 Jingchang Lu wrote: > @@ -459,20 +480,27 @@ static void fill_tcd_params(struct fsl_edma_engine > *edma, > u16 csr = 0; > > /* > -* eDMA hardware SGs require the TCD pa

Re: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Arnd Bergmann
On Tuesday 23 September 2014 17:15:19 Jingchang Lu wrote: > @@ -459,20 +480,27 @@ static void fill_tcd_params(struct fsl_edma_engine > *edma, > u16 csr = 0; > > /* > -* eDMA hardware SGs require the TCD parameters stored in memory > -* the same endian as the eDMA

Re: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Russell King - ARM Linux
On Tue, Sep 23, 2014 at 05:15:19PM +0800, Jingchang Lu wrote: > static u16 edma_readw(struct fsl_edma_engine *edma, void __iomem *addr) > { > - if (edma->big_endian) > - return ioread16be(addr); > - else > + u32 dst; This should be unsigned long, if it needs to exist. >

[PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model

2014-09-23 Thread Jingchang Lu
The offset of all 8-/16-bit register in big-endian eDMA model are swapped in a 32-bit size opposite those in the little-endian model. The hardware Scatter/Gather requires the subsequent TCDs in memory to be auto loaded should retain the same endian as the core independent of the register endian mo