[PATCH v2] Revert "mmc: dw_mmc: Extract FIFO data transfer into a separate routine"

Simon Glass sjg at chromium.org
Wed Oct 9 03:57:21 CEST 2024


On Tue, 8 Oct 2024 at 13:18, Jonas Karlman <jonas at kwiboo.se> wrote:
>
> The commit 0252924ac6d4 ("mmc: dw_mmc: Extract FIFO data transfer into a
> separate routine") unintentionally changed behavior of the FIFO data
> transfer routine.
>
> When data is read and size reaches 0 the original loop would wait on
> DWMCI_INTMSK_DTO or timeout. The remaining size to read and buf position
> is no longer tracked across dwmci_data_transfer_fifo() calls and because
> of this an extra call to fifo() and dwmci_fifo_ready() may now trigger a
> FIFO underflow timeout error and slows down FIFO reading.
>
>   Buswidth = 4, clock: 50000000
>   Sending CMD16
>   Sending CMD17
>   dwmci_fifo_ready: FIFO underflow timeout
>   Sending CMD16
>   Sending CMD18
>   dwmci_fifo_ready: FIFO underflow timeout
>   Sending CMD12
>   ## Checking hash(es) for config config-1 ... OK
>
> This reverts commit 0252924ac6d4af69061bb9589d16b30c5bdb7178 to restore
> the old working behavior.
>
> Fixes: 0252924ac6d4 ("mmc: dw_mmc: Extract FIFO data transfer into a separate routine")
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> ---
> Changes in v2:
> - Change to revert the offending commit, both size and buf where reset
>   between fifo() calls, easier to do a full revert.
> - R-b tag not collected because of this being a different patch.
>
> Reading FIT from SD-card take ~20-30 seconds on a Rockchip RK3328 board
> without this reverted, and goes back to sub second once reverted.
> ---
>  drivers/mmc/dw_mmc.c | 103 ++++++++++++++++++++++---------------------
>  1 file changed, 52 insertions(+), 51 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list