mmc: moxart: set maximum request/block/segment sizes
authorSergei Antonov <saproj@gmail.com>
Fri, 10 Feb 2023 14:38:43 +0000 (17:38 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 15 Feb 2023 12:24:03 +0000 (13:24 +0100)
commit16b492ce0a55735ed6f4c19ee9fb767badb3f19a
tree01ab2290fb1843c642c3a0ae7bea9a60621bf57e
parent08623d741e94dc9ca033ecb8d04312960a105377
mmc: moxart: set maximum request/block/segment sizes

Per datasheet: maximum block length is 2048 bytes,
data length field is in bits 0-23 of the Data Length Register.

Also for DMA mode we have to take into account rx/tx buffers' sizes.

In my tests this change doubles SD card I/O performance on big files.
Before the change Linux used default request size of 4 KB.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Link: https://lore.kernel.org/r/20230210143843.369943-1-saproj@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/moxart-mmc.c