linux/drivers/dma
Huang Shijie 921de864b7 mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg()
[1] Background :
    The GPMI does ECC read page operation with a DMA chain consist of three DMA
    Command Structures. The middle one of the chain is used to enable the BCH,
    and read out the NAND page.

    The WAIT4END(wait for command end) is a comunication signal between
    the GPMI and MXS-DMA.

[2] The current DMA code sets the WAIT4END bit at the last one, such as:

    +-----+               +-----+                      +-----+
    | cmd | ------------> | cmd | ------------------>  | cmd |
    +-----+               +-----+                      +-----+
                                                          ^
                                                          |
                                                          |
                                                     set WAIT4END here

    This chain works fine in the mx23/mx28.

[3] But in the new GPMI version (used in MX50/MX60), the WAIT4END bit should
    be set not only at the last DMA Command Structure,
    but also at the middle one, such as:

    +-----+               +-----+                      +-----+
    | cmd | ------------> | cmd | ------------------>  | cmd |
    +-----+               +-----+                      +-----+
                             ^                            ^
                             |                            |
                             |                            |
                        set WAIT4END here too        set WAIT4END here

    If we do not set WAIT4END, the BCH maybe stalls in "ECC reading page" state.
    In the next ECC write page operation, a DMA-timeout occurs.
    This has been catched in the MX6Q board.

[4] In order to fix the bug, rewrite the last parameter of mxs_dma_prep_slave_sg(),
    and use the dma_ctrl_flags:
    ---------------------------------------------------------
      DMA_PREP_INTERRUPT : append a new DMA Command Structrue.
      DMA_CTRL_ACK       : set the WAIT4END bit for this DMA Command Structure.
    ---------------------------------------------------------

[5] changes to the relative drivers:
    <1> For mxs-mmc driver, just use the new flags, do not change any logic.
    <2> For gpmi-nand driver, and use the new flags to set the DMA
        chain, especially for ecc read page.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:37:28 +01:00
..
ioat ioat: fix xor_idx_to_desc 2011-08-03 22:25:06 -07:00
ipu i.MX IPU DMA: Fix wrong burstsize settings 2011-12-08 12:59:03 +05:30
ppc4xx Merge branch 'old_next' into next 2011-04-06 11:51:12 +05:30
amba-pl08x.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
at_hdmac_regs.h at_hdmac: bugfix for enabling channel irq 2012-01-31 09:09:04 +05:30
at_hdmac.c at_hdmac: bugfix for enabling channel irq 2012-01-31 09:09:04 +05:30
coh901318_lli.c dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
coh901318_lli.h dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
coh901318.c dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
dmaengine.c DMAEngine: Define interleaved transfer request api 2011-11-18 12:16:24 +05:30
dmatest.c dmaengine: fix missing 'cnt' in ?: in dmatest 2012-01-23 11:43:18 -08:00
dw_dmac_regs.h dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume 2011-11-28 08:48:02 +05:30
dw_dmac.c dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume 2011-11-28 08:48:02 +05:30
ep93xx_dma.c dma/ep93xx_dma: prevent ep93xx_dma_tasklet() to reference an empty list 2011-12-05 08:16:26 +05:30
fsldma.c dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
fsldma.h fsldma: fix controller lockups 2011-03-11 17:52:36 -08:00
imx-dma.c Merge branch 'dma_slave_direction' into next_test_dirn 2011-11-17 14:54:57 +05:30
imx-sdma.c i.MX SDMA: Fix burstsize settings 2012-02-02 14:00:43 +05:30
intel_mid_dma_regs.h dmaengine: intel_mid_dma: remove legacy pm interface 2012-01-02 16:34:42 +05:30
intel_mid_dma.c dmaengine: intel_mid_dma: remove legacy pm interface 2012-01-02 16:34:42 +05:30
iop-adma.c dmaengine: convert drivers/dma/* to use module_platform_driver() 2011-12-05 08:25:54 +05:30
iovlock.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig dma: MX3_IPU fix depends 2011-12-19 12:26:07 +01:00
Makefile dmaengine: add CSR SiRFprimaII DMAC driver 2011-11-18 12:25:22 +05:30
mpc512x_dma.c dmaengine: convert drivers/dma/* to use module_platform_driver() 2011-12-05 08:25:54 +05:30
mv_xor.c ARM: Orion: Get address map from plat-orion instead of via platform_data 2011-12-13 18:46:55 -05:00
mv_xor.h
mxs-dma.c mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg() 2012-03-27 00:37:28 +01:00
pch_dma.c Merge branch 'dma_slave_direction' into next_test_dirn 2011-11-17 14:54:57 +05:30
pl330.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
shdma.c dma: sh_dma: not all SH DMAC implementations support MEMCPY 2012-02-01 22:23:53 +05:30
shdma.h dma: shdma: transfer based runtime PM 2011-09-28 10:07:40 +05:30
sirf-dma.c dmaengine: convert drivers/dma/* to use module_platform_driver() 2011-12-05 08:25:54 +05:30
ste_dma40_ll.c dma40: cyclic xfer support 2011-01-30 22:27:21 -08:00
ste_dma40_ll.h dmaengine/ste_dma40: support pm in dma40 2011-11-22 09:46:06 +05:30
ste_dma40.c dmaengine/ste_dma40: clear LNK on channel startup 2012-01-02 16:42:44 +05:30
timb_dma.c dmaengine: convert drivers/dma/* to use module_platform_driver() 2011-12-05 08:25:54 +05:30
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
txx9dmac.h