[PATCH v2 0/4] mmc: introduce multi-block read gap tuning
From: Benoît Monin
Date: Mon Jul 07 2025 - 11:25:06 EST
This patchset implements the multi-block read gap tuning for the SDHCI
cadence driver. To do so, a generic function (mmc_read_blocks) to read
blocks from the MMC is added to mmc_ops in the first patch.
The second patch is the implementation proper in the driver which try
to do a multi-block read and increase the gap delay until it succeeds.
The read gap is done by the controller when its internal fifo is full
when reading multiple blocks. That is why we cannot use mmc_get_ext_csd
to do the tuning since it only read one block.
The implementation of the mmc_read_blocks also brings a helper to check
for CMD23 support by MMC card, similar to mmc_host_can_cmd23 for host,
so the last two patches uses it instead of local implementation in
mmc_test.c and block.c.
v1 -> v2:
Split the code between the core and the driver by adding a generic
function to read blocks from the MMC.
Link to v1:
https://lore.kernel.org/linux-mmc/2a43386ffef4012530ca2421ad81ad21c36c8a25.1750943549.git.benoit.monin@xxxxxxxxxxx/
Benoît Monin (4):
mmc: core: add mmc_read_blocks to mmc_ops
mmc: sdhci-cadence: implement multi-block read gap tuning
mmc: mmc_test: use mmc_card_can_cmd23
mmc: block: use mmc_card_can_cmd23
drivers/mmc/core/block.c | 12 ++----
drivers/mmc/core/card.h | 10 +++++
drivers/mmc/core/mmc_ops.c | 69 ++++++++++++++++++++++++++++++
drivers/mmc/core/mmc_test.c | 9 +---
drivers/mmc/host/sdhci-cadence.c | 72 +++++++++++++++++++++++++++++++-
include/linux/mmc/host.h | 3 ++
6 files changed, 157 insertions(+), 18 deletions(-)