diff options
author | Iulian Banaga <iulianeugen.banaga@mobileye.com> | 2025-07-21 15:35:00 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2025-07-24 12:43:31 +0800 |
commit | 1080815650a00257929f645bedf4e1795bf188bf (patch) | |
tree | 632bee726e3db3d1b53ff1e972bf169b892065a0 /drivers/fpga/fpga.c | |
parent | bda1e3f0e7d85ece6bddaed3024e3ef6593482cf (diff) |
Fix emmc error state after mmc write timeout
This is a fix for the sporadic mmc write failure:
mmc write failed
0 blocks written: ERROR
After this happens the emmc will remain in an error state
where subsequent read/writes fail with a timeout.
The mmc driver sends CMD25 - WRITE_MULTIPLE_BLOCK which
can sporadically timeout. When this happens, the mmc driver
aborts the transfer and returns the above error messages.
But the emmc still remains in data transfer mode, since
the timeout was decided by uboot, not by the emmc.
Fix this by sending the STOP_TRANSMISSION command (CMD12)
and waiting for the emmc to be in ready state again (CMD13).
Transferring data blocks after a CMD25 can take anywhere
between 5 and +15s on Samsung EMMCs and the current timeout
is not enough. Increase the timeout by 2x to accommodate the
long transfer times observed.
Signed-off-by: Iulian Banaga <iulianeugen.banaga@mobileye.com>
Acked-by: Jimmy Durand Wesolowski <jimmy.wesolowski@mobileye.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/fpga/fpga.c')
0 files changed, 0 insertions, 0 deletions