alistair23-linux/drivers/dma
Viresh Kumar e071916580 dmaengine/amba-pl08x: Align lli_len to max(src.width, dst.width)
Currently lli_len is aligned to min of two widths, which looks to be incorrect.
Instead it should be aligned to max of both widths.

Lets say, total_size = 441 bytes

MIN: lets check if min() suits or not:

CASE 1: srcwidth = 1, dstwidth = 4
min(src, dst) = 1

i.e. We program transfer size in control reg to 441.
Now, till 440 bytes everything is fine, but on the last byte DMAC can't transfer
1 byte to dst, as its width is 4.

CASE 2: srcwidth = 4, dstwidth = 1
min(src, dst) = 1

i.e. we program transfer size in control reg to 110 (data transferred = 110 * srcwidth).
So, here too 1 byte is left, but on the source side.

MAX: Lets check if max() suits or not:

CASE 3: srcwidth = 1, dstwidth = 4
max(src, dst) = 4

Aligned size is 440

i.e. We program transfer size in control reg to 440.
Now, all 440 bytes will be transferred without any issues.

CASE 4: srcwidth = 4, dstwidth = 1
max(src, dst) = 4

Aligned size is 440

i.e. We program transfer size in control reg to 110 (data transferred = 110 * srcwidth).
Now, also all 440 bytes will be transferred without any issues.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2011-08-25 19:33:39 +05:30
..
ioat ioat: fix xor_idx_to_desc 2011-08-03 22:25:06 -07:00
ipu Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2011-08-01 13:46:37 -10:00
ppc4xx
amba-pl08x.c dmaengine/amba-pl08x: Align lli_len to max(src.width, dst.width) 2011-08-25 19:33:39 +05:30
at_hdmac.c dmaengine: at_hdmac: fix way to specify cyclic capability 2011-08-19 18:40:04 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: add wrappers for testing channel state 2011-08-19 18:39:59 +05:30
coh901318.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2011-08-01 13:46:37 -10:00
coh901318_lli.c
coh901318_lli.h
dmaengine.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2011-08-04 16:43:43 -10:00
dmatest.c dmaengine/dmatest: Terminate transfers on all channels in case of error or exit 2011-08-08 19:32:01 +05:30
dw_dmac.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2011-05-28 12:35:15 -07:00
dw_dmac_regs.h
ep93xx_dma.c dma/ep93xx_dma.c: local symbols should be static 2011-06-16 09:47:49 +05:30
fsldma.c
fsldma.h
imx-dma.c ARM i.MX dma: Fix burstsize settings 2011-07-07 09:55:50 +02:00
imx-sdma.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2011-08-01 13:46:37 -10:00
intel_mid_dma.c dma: intel_mid_dma: remove redundant pci_set_drvdata calls 2011-07-26 15:33:27 +05:30
intel_mid_dma_regs.h
iop-adma.c
iovlock.c
Kconfig dmaengine: add ep93xx DMA support 2011-06-08 15:10:44 -06:00
Makefile dmaengine: add ep93xx DMA support 2011-06-08 15:10:44 -06:00
mpc512x_dma.c
mv_xor.c dma: mv_xor: use resource_size() 2011-07-14 03:32:31 +05:30
mv_xor.h
mxs-dma.c mxs-dma: enable CLKGATE before accessing registers 2011-08-16 18:33:42 +05:30
pch_dma.c pch_dma: Fix CTL register access issue 2011-07-25 19:11:12 +05:30
pl330.c dmaengine: pl330: make platform data optional 2011-07-26 15:32:52 +05:30
shdma.c Merge branch 'common/dma' into sh-latest 2011-06-21 17:59:05 +09:00
shdma.h dmaengine: shdma: add chcr_ie_bit 2011-06-21 17:56:01 +09:00
ste_dma40.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2011-08-01 13:46:37 -10:00
ste_dma40_ll.c
ste_dma40_ll.h dmaengine/ste_dma40: use AMBA PrimeCell helper macros 2011-07-14 04:09:10 +05:30
timb_dma.c
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c
txx9dmac.h