u-boot-brain/drivers/mmc
Marek Vasut 4a66d4ee33 mmc: tmio: sdhi: Implement get_b_max function
Implement get_b_max() for the Renesas R-Car SDHI controller driver, limit
the b_max per hardware capabilities such that select Gen2 controllers have
16bit block transfer limit, the rest has 32bit block transfer limit and on
Gen3, the block transfer limit on addresses above the 32bit boundary is set
to 1/4 of the malloc area.

Originally, on Gen3, the block transfers above the 32bit area were limited
to PIO only, which resulted in (R8A7795 Salvator-X , HS200 eMMC):
  => time mmc read 0x0000000700000000 0 0x10000
  time: 0.151 seconds
  => time mmc read 0x0000000700000000 0 0x100000
  time: 11.090 seconds
with bounce buffer in place and b_max adjustment in place:
  => time mmc read 0x0000000700000000 0 0x10000
  time: 0.156 seconds
  => time mmc read 0x0000000700000000 0 0x100000
  time: 2.349 seconds

Note that the bounce buffer does mallocate and free the bounce buffer
for every transfer. Experiment which removes this results in further
increase of read speed, from 2.349s to 2.156s per 512 MiB of data,
which is not such a significant improvement anymore. It might however
be interesting to have bounce buffer directly in the MMC core or even
block core.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2020-04-22 20:41:56 +08:00
..
am654_sdhci.c mmc: am654_sdhci: Implement workaround for card detect 2020-03-09 08:33:16 +08:00
arm_pl180_mmci.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
arm_pl180_mmci.h mmc: arm_pl180_mmci: Sync compatible with kernel 2019-04-23 15:31:30 +02:00
aspeed_sdhci.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
atmel_sdhci.c mmc: atmel_sdhci: Add sam9x60-sdhci compatibility string 2019-10-08 09:16:11 +03:00
bcm2835_sdhci.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
bcm2835_sdhost.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
bcmstb_sdhci.c mmc: bcm: fix uninitialized pointer deref on probe 2019-08-09 13:45:25 +08:00
ca_dw_mmc.c mmc: ca_dw_mmc: add DesignWare based DM support for CAxxxx SoCs 2020-03-09 08:33:13 +08:00
davinci_mmc.c Revert "mmc: davinci: drop struct davinci_mmc_plat" 2020-01-04 09:33:33 -05:00
dw_mmc.c common: Move ARM cache operations out of common.h 2019-12-02 18:24:58 -05:00
exynos_dw_mmc.c ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC 2018-08-06 10:53:53 +09:00
fsl_esdhc_imx.c mmc: Merge SD_LEGACY and MMC_LEGACY bus modes 2020-03-09 08:33:16 +08:00
fsl_esdhc_spl.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
fsl_esdhc.c mmc: fsl_esdhc: actually enable cache snooping on mpc830x 2020-02-19 21:21:42 +08:00
ftsdc010_mci.c mmc: ftsdc010_mci: Sync compatible with DT mmc node 2018-05-29 14:45:03 +08:00
ftsdc010_mci.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gen_atmel_mci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hi6220_dw_mmc.c mmc: Add support for HI3660 SoC reusing hi6220_dw_mmc driver 2019-08-11 16:43:41 -04:00
iproc_sdhci.c drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg 2020-04-22 20:41:55 +08:00
jz_mmc.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
Kconfig mmc: tmio: sdhi: Use bounce buffer to avoid DMA limitations 2020-04-22 20:41:56 +08:00
kona_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile mmc: ca_dw_mmc: add DesignWare based DM support for CAxxxx SoCs 2020-03-09 08:33:13 +08:00
meson_gx_mmc.c mmc: meson-gx: enable input clocks 2020-04-06 09:56:35 +02:00
mmc_boot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mmc_legacy.c mmc: Register only the first MMC device on MMC_TINY 2019-07-13 11:11:26 -04:00
mmc_private.h mmc: add mmc_poll_for_busy() and change the purpose of mmc_send_status() 2019-07-15 10:16:49 +08:00
mmc_spi.c dm: mmc_spi: Fix NULL pointer dereference in mmc_spi_bind() 2019-09-05 15:29:29 +08:00
mmc_write.c mmc: Rename timeout parameters for clarification 2019-09-05 15:27:31 +08:00
mmc-uclass.c mmc: Add option to adjust b_max before long read 2020-04-22 20:41:56 +08:00
mmc.c mmc: Add option to adjust b_max before long read 2020-04-22 20:41:56 +08:00
msm_sdhci.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mtk-sd.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mv_sdhci.c mmc: mv_sdhci: fix uninitialized pointer deref on probe 2019-07-31 15:31:36 +08:00
mvebu_mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxcmmc.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
mxsmmc.c mmc: Replace printf with debug call for timeouts in the i.MX28 mxs driver 2019-10-08 16:36:36 +02:00
omap_hsmmc.c mmc: Merge SD_LEGACY and MMC_LEGACY bus modes 2020-03-09 08:33:16 +08:00
pci_mmc.c mmc: pci: fix uninitialized pointer deref on probe 2019-08-09 13:45:25 +08:00
pic32_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pxa_mmc_gen.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
renesas-sdhi.c mmc: tmio: sdhi: Implement get_b_max function 2020-04-22 20:41:56 +08:00
rockchip_dw_mmc.c rockchip: dwmmc: add handling for u-boot, spl-fifo-mode 2019-11-23 23:41:44 +08:00
rockchip_sdhci.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
rpmb.c drivers: mmc: rpmb: Use R1 response 2020-02-17 14:55:04 +08:00
s5p_sdhci.c mmc: s5p_sdhci: Read generic MMC properties from DT 2020-01-23 11:43:10 +09:00
sandbox_mmc.c sandbox: mmc: Fix up MMC emulator for valgrind 2019-10-08 13:57:39 +08:00
sdhci-cadence.c mmc: sdhci-cadence: send tune request twice to work around errata 2020-02-17 14:55:04 +08:00
sdhci.c sdhci: Add sdhci_deferred_probe() API 2020-03-09 08:33:16 +08:00
sh_mmcif.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sh_mmcif.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sh_sdhi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
snps_dw_mmc.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
socfpga_dw_mmc.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sti_sdhci.c mmc: sti_sdhci: Fix sdhci_setup_cfg() call. 2019-08-27 09:36:56 +02:00
stm32_sdmmc2.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sunxi_mmc.c mmc: sunxi: Honour non-removable property in DT 2019-01-29 23:49:41 +05:30
tangier_sdhci.c mmc: tangier_sdhci: fix uninitialized pointer deref on probe 2019-08-09 13:45:25 +08:00
tegra_mmc.c mmc: t210: Fix 'bad' SD-card clock when doing 400KHz card detect 2020-04-02 14:30:01 -07:00
tmio-common.c mmc: tmio: sdhi: Add DMA transfer address alignment check at writing 2020-04-21 10:12:15 +08:00
tmio-common.h mmc: tmio: sdhi: Implement get_b_max function 2020-04-22 20:41:56 +08:00
uniphier-sd.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
xenon_sdhci.c mmc: sdhci: Make set_ios_post() return int 2019-07-17 11:12:08 -04:00
zynq_sdhci.c mmc: Merge SD_LEGACY and MMC_LEGACY bus modes 2020-03-09 08:33:16 +08:00