linux/drivers/mmc/host
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
..
Kconfig drivers: misc: Remove MISC_DEVICES config option 2012-01-24 16:24:02 -08:00
Makefile mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00
at91_mci.c MMC highlights for 3.3: 2012-01-13 20:41:15 -08:00
at91_mci.h mmc: at91_mci: move register header from include/ to drivers/ 2011-07-21 10:35:08 -04:00
atmel-mci-regs.h mmc: atmel-mci: add pdc support and runtime capabilities detection 2011-10-26 15:43:26 -04:00
atmel-mci.c mmc: atmel-mci: save and restore sdioirq when soft reset is performed 2012-02-13 20:39:05 -05:00
au1xmmc.c MIPS: Alchemy: Au1300 SoC support 2011-12-07 22:02:05 +00:00
bfin_sdh.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
cb710-mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
cb710-mmc.h mmc: Driver for CB710/720 memory card reader (MMC part) 2009-06-13 22:42:58 +02:00
davinci_mmc.c mmc: davinci: Add support for set_power callback 2011-09-17 15:53:23 +05:30
dw_mmc.c mmc: dw_mmc: Fix PIO mode with support of highmem 2012-02-13 20:39:05 -05:00
dw_mmc.h mmc: dw_mmc: fixed wrong bit operation for SDMMC_GET_FCNT() 2012-01-12 15:17:15 -05:00
imxmmc.c mmc: replace printk with appropriate display macro 2011-10-26 16:32:22 -04:00
imxmmc.h imxmmc: use readl/writel 2008-12-16 14:58:17 +01:00
jz4740_mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
mmc_spi.c mmc: Remove redundant spi driver bus initialization 2012-01-11 23:58:42 -05:00
mmci.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
mmci.h mmc: mmci: implement pre_req() and post_req() 2011-07-20 17:21:11 -04:00
msm_sdcc.c mmc: remove the second argument of k[un]map_atomic() 2012-01-11 23:58:42 -05:00
msm_sdcc.h mmc: msm_sdcc: Use MCI_INT_MASK0 for PIO interrupts 2011-10-26 15:43:37 -04:00
mvsdio.c ARM: Orion: Get address map from plat-orion instead of via platform_data 2011-12-13 18:46:55 -05:00
mvsdio.h mmc: SDIO driver for Marvell SoCs 2009-03-24 21:30:03 +01:00
mxcmmc.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
mxs-mmc.c mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg() 2012-03-27 00:37:28 +01:00
of_mmc_spi.c mmc: of_mmc_spi: fix little endian support 2012-02-13 20:38:58 -05:00
omap.c misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
omap_hsmmc.c MMC highlights for 3.3: 2012-01-13 20:41:15 -08:00
pxamci.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
pxamci.h [ARM] pxa: mmc: add 1st host controller support for pxa3xx 2008-01-26 15:07:53 +00:00
s3cmci.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
s3cmci.h s3cmci: DMA fixes 2009-10-01 16:11:15 -07:00
sdhci-cns3xxx.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-dove.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-esdhc-imx.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-esdhc.h mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms 2012-01-11 23:58:41 -05:00
sdhci-of-esdhc.c mmc: esdhc: fix errors when booting kernel on Freescale eSDHC version 2.3 2012-02-12 00:24:24 -05:00
sdhci-of-hlwd.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-pci-data.c mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00
sdhci-pci.c mmc: sdhci-pci: set Medfield SDIO as non-removable 2012-02-13 20:39:01 -05:00
sdhci-pltfm.c mmc: esdhc: set the timeout to the max value 2012-02-13 20:38:59 -05:00
sdhci-pltfm.h mmc: sdhci: remove "state" argument from sdhci_suspend_host 2011-12-19 15:50:11 -08:00
sdhci-pxav2.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-pxav3.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-s3c.c MMC highlights for 3.3: 2012-01-13 20:41:15 -08:00
sdhci-spear.c mmc: sdhci-spear: Fix compilation error 2012-01-12 15:17:09 -05:00
sdhci-tegra.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci.c mmc: sdhci: restore the enabled dma when do reset all 2012-01-12 15:17:17 -05:00
sdhci.h mmc: host: Adds support for eMMC 4.5 HS200 mode 2012-01-12 15:17:16 -05:00
sdricoh_cs.c mmc: Add module.h to drivers/mmc users assuming implicit presence. 2011-10-26 16:32:19 -04:00
sh_mmcif.c mmc: sh_mmcif: fix late delayed work initialisation 2012-02-13 20:39:03 -05:00
sh_mobile_sdhi.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
tifm_sd.c Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-01-14 12:32:16 -08:00
tmio_mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
tmio_mmc.h mmc: tmio_mmc: fix card eject during IO with DMA 2012-02-13 20:39:03 -05:00
tmio_mmc_dma.c mmc: tmio_mmc: fix card eject during IO with DMA 2012-02-13 20:39:03 -05:00
tmio_mmc_pio.c mmc: tmio_mmc: fix card eject during IO with DMA 2012-02-13 20:39:03 -05:00
ushc.c USB: convert some miscellanies drivers to use module_usb_driver() 2011-11-18 09:52:10 -08:00
via-sdmmc.c mmc: replace printk with appropriate display macro 2011-10-26 16:32:22 -04:00
vub300.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
wbsd.c mmc: replace printk with appropriate display macro 2011-10-26 16:32:22 -04:00
wbsd.h mmc: update header file paths 2007-07-26 01:53:31 +02:00