Skip to content
Snippets Groups Projects
Commit bcfb3653 authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Stefano Babic
Browse files

mmc: fsl_esdhc: Fix PIO timeout


The following error has been observed on i.MX25 with a high-speed SDSC
card:
    Data Write Failed in PIO Mode.

It was caused by the timeout set on PRSSTAT.BWEN, which was triggered
because this bit takes 15 ms to be set after writing the first block to
DATPORT with this card. Without this timeout, all the blocks are
properly written.

This timeout was implemented by decrementing a variable, so it was
depending on the CPU frequency. Fix this issue by setting this timeout
to a long enough absolute duration (500 ms).

Signed-off-by: default avatarBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
parent cc65e354
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment