linux/drivers/mmc/host
Alexey Brodkin 5959b32e36 mmc: dw_mmc: handle data blocks > than 4kB if IDMAC is used
As per DW MobileStorage databook "each descriptor can transfer up to 4kB
of data in chained mode", moreover buffer size that is put in "des1" is
limited to 13 bits, i.e. for example on attempt to
IDMAC_SET_BUFFER1_SIZE(desc, 8192) size value that's effectively written
will be 0.

On the platform with 8kB PAGE_SIZE I see dw_mmc gets data blocks in
SG-list of 8kB size and that leads to unpredictable behavior of the
SD/MMC controller.

In particular on write to FAT partition of SD-card the controller will
stuck in the middle of DMA transaction.

Solution to the problem is simple - we need to pass large (> 4kB) data
buffers to the controller via multiple descriptors. And that's what
that change does.

What's interesting I did try original driver on same platform but
configured with 4kB PAGE_SIZE and may confirm that data blocks passed
in SG-list to dw_mmc never exeed 4kB limit - that explains why nobody
ever faced a problem I did.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Seungwon Jeon <tgih.jun@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: arc-linux-dev@synopsys.com
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2015-08-17 11:34:08 +02:00
..
android-goldfish.c remove <asm/scatterlist.h> 2015-05-05 13:35:39 -06:00
atmel-mci-regs.h mmc: atmel-mci: use endian agnostic IO 2015-03-25 09:46:18 +01:00
atmel-mci.c mmc: atmel-mci: fix bad variable type for clkdiv 2015-05-18 09:04:42 +02:00
au1xmmc.c
bfin_sdh.c
cb710-mmc.c
cb710-mmc.h
davinci_mmc.c mmc: davinci: Constify platform_device_id 2015-06-01 09:06:49 +02:00
dw_mmc-exynos.c mmc: dw_mmc: exynos: Fix modalias to make module auto-loading work 2015-06-01 09:07:06 +02:00
dw_mmc-exynos.h mmc: dw_mmc: exynos: Support eMMC's HS400 mode 2015-03-23 14:13:28 +01:00
dw_mmc-k3.c mmc: dw_mmc: k3: Fix modalias to make module auto-loading work 2015-06-01 09:07:05 +02:00
dw_mmc-pci.c
dw_mmc-pltfm.c mmc: dw_mmc: Add support for IMG Pistachio 2014-11-26 14:31:03 +01:00
dw_mmc-pltfm.h
dw_mmc-rockchip.c mmc: dw_mmc: rockchip: Fix modalias to make module auto-loading work 2015-06-01 09:07:06 +02:00
dw_mmc.c mmc: dw_mmc: handle data blocks > than 4kB if IDMAC is used 2015-08-17 11:34:08 +02:00
dw_mmc.h mmc: dw_mmc: Use core to handle absent write protect line 2015-06-01 09:07:05 +02:00
jz4740_mmc.c
Kconfig mmc: MMC_MTK should depend on HAS_DMA 2015-07-24 10:18:33 +02:00
Makefile mmc: mediatek: Add Mediatek MMC driver 2015-06-18 09:20:48 +02:00
mmc_spi.c mmc: constify of_device_id array 2015-03-23 14:13:49 +01:00
mmci_qcom_dml.c
mmci_qcom_dml.h
mmci.c mmc: mmci: Cascade EPROBE_DEFER from regulators. 2015-03-25 09:46:35 +01:00
mmci.h
moxart-mmc.c mmc: moxart: fix probe logic 2015-02-04 09:42:29 +01:00
mtk-sd.c mmc: mediatek: Add PM support for MMC driver 2015-06-18 09:21:04 +02:00
mvsdio.c mmc: mvsdio: don't use devm_pinctrl_get_select_default() in probe 2015-01-19 09:56:21 +01:00
mvsdio.h
mxcmmc.c mmc: host: mxcmmc: Simplify a trivial if-return sequence 2015-06-01 09:07:02 +02:00
mxs-mmc.c mmc: mxs: Constify platform_device_id 2015-06-01 09:06:50 +02:00
of_mmc_spi.c
omap_hsmmc.c mmc: omap_hsmmc: regulator automatically released by devm 2015-08-17 11:32:46 +02:00
omap.c mmc: omap: use for_each_sg() for scatterlist parsing 2015-08-17 11:32:42 +02:00
pxamci.c mmc: pxamci: switch over to dmaengine use 2015-08-17 11:32:40 +02:00
pxamci.h
rtsx_pci_sdmmc.c mmc: rtsx: Constify platform_device_id 2015-06-01 09:06:50 +02:00
rtsx_usb_sdmmc.c mmc: rtsx: Constify platform_device_id 2015-06-01 09:06:50 +02:00
s3cmci.c mmc: s3cmci: Constify platform_device_id 2015-06-01 09:06:51 +02:00
s3cmci.h
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: Fix the size passed to sdhci_alloc_host 2015-06-01 09:06:46 +02:00
sdhci-acpi.c mmc: sdhci: Remove the sdhci exported header file 2015-03-23 14:13:45 +01:00
sdhci-bcm2835.c mmc: sdhci-bcm2835: Actually enable the clock 2015-06-01 09:56:07 +02:00
sdhci-bcm-kona.c mmc: sdhci: set the .remove to sdhci_pltfm_unregister() 2015-03-23 14:13:35 +01:00
sdhci-cns3xxx.c mmc: sdhci: set the .remove to sdhci_pltfm_unregister() 2015-03-23 14:13:35 +01:00
sdhci-dove.c mmc: sdhci: set the .remove to sdhci_pltfm_unregister() 2015-03-23 14:13:35 +01:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: clear f_max in boarddata 2015-07-24 10:18:38 +02:00
sdhci-esdhc.h mmc: sdhci-esdhc: add default quirk SDHCI_QUIRK_NO_HISPD_BIT 2015-08-17 11:32:47 +02:00
sdhci-iproc.c mmc: sdhci-iproc: fix oops in sdhci_iproc_writew 2015-03-23 14:13:47 +01:00
sdhci-msm.c mmc: sdhci-msm: Boost controller core clock 2015-08-17 11:32:43 +02:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: add quirks for broken clock base 2015-08-17 11:32:41 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: enable interrupt mode to detect card 2015-06-01 09:07:18 +02:00
sdhci-of-hlwd.c mmc: sdhci: set the .remove to sdhci_pltfm_unregister() 2015-03-23 14:13:35 +01:00
sdhci-pci-data.c mmc: sdhci-pci: Add support for drive strength selection for SPT 2015-06-01 09:07:14 +02:00
sdhci-pci-o2micro.c
sdhci-pci-o2micro.h
sdhci-pci.c mmc: sdhci-pci: Change AMD SDHCI quirk application scope 2015-06-16 08:58:35 +02:00
sdhci-pci.h mmc: sdhci-pci: Add support for drive strength selection for SPT 2015-06-01 09:07:14 +02:00
sdhci-pltfm.c mmc: sdhci-pltfm: remove the unneeded check of disabled device 2015-03-23 14:13:44 +01:00
sdhci-pltfm.h
sdhci-pxav2.c mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro 2015-06-01 09:06:53 +02:00
sdhci-pxav3.c mmc: sdhci-pxav3: fix platform_data is not initialized 2015-07-24 10:18:39 +02:00
sdhci-s3c-regs.h
sdhci-s3c.c mmc: sdhci-s3c: Constify platform_device_id 2015-06-01 09:06:52 +02:00
sdhci-sirf.c mmc: sdhci-sirf: fake version and capbility registers 2015-06-01 09:06:49 +02:00
sdhci-spear.c Update Viresh Kumar's email address 2015-07-17 16:39:53 -07:00
sdhci-st.c mmc: sdhci-st: Fix modalias to make module auto-loading work 2015-06-01 09:07:07 +02:00
sdhci-tegra.c mmc: sdhci-tegra: convert to use GPIO descriptors 2015-04-01 12:56:07 +02:00
sdhci.c mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set 2015-08-17 11:32:44 +02:00
sdhci.h mmc: sdhci: add quirk SDHCI_QUIRK_CLOCK_DIV_ZERO_BROKEN 2015-08-17 11:32:41 +02:00
sdricoh_cs.c
sh_mmcif.c mmc: sh_mmcif: calculate best clock with parent clock 2015-06-01 09:07:10 +02:00
sh_mobile_sdhi.c mmc: sh_mobile_sdhi: remove sh_mobile_sdhi_info 2015-03-05 21:54:26 +05:30
sunxi-mmc.c mmc: sunxi: add MMC_CAP_SDIO_IRQ capability 2015-03-23 14:13:47 +01:00
tifm_sd.c
tmio_mmc_dma.c mmc: tmio: mmc: tmio: tmio_mmc_data has .chan_priv_?x 2015-03-05 21:54:17 +05:30
tmio_mmc_pio.c mmc: TMIO: Fix I/O mapping leak on error using devm_ioremap() 2015-06-01 09:06:47 +02:00
tmio_mmc.c mmc: TMIO: Use devm_request_irq() 2015-06-01 09:06:48 +02:00
tmio_mmc.h mmc: tmio: mmc: tmio: tmio_mmc_data has .chan_priv_?x 2015-03-05 21:54:17 +05:30
toshsd.c mmc: toshsd: Fix unbalanced locking 2015-01-19 09:56:07 +01:00
toshsd.h
usdhi6rol0.c
ushc.c
via-sdmmc.c
vub300.c mmc: vub300: remove unreachable return value handling 2015-01-21 12:02:05 +01:00
wbsd.c
wbsd.h
wmt-sdmmc.c mmc: constify of_device_id array 2015-03-23 14:13:49 +01:00