ARMV7: OMAP: MMC: Relax erase timeouts and cleanup
We have occasionally seen erase timeout errors. Sometimes erases
of 1M blocks will take around 6 seconds instead of the typical
less than 1 second. I believe this is due to the MMC doing
housekeeping. To try to prevent this from happening, the
following changes have been made:
1) The base timeout for an erase used to be 5X the retry
time. This change increases that to 10X.
2) Only a warning is printed when the timeout is first hit.
The timeout is then doubled and if it is hit again, TIMEOUT
will be returned and an error printed.
In addition, several other minor changes were made:
1) The code used to add 1 ms per 1000 blocks to the timeout.
This was changed to 1 ms to 1024 blocks to allow the compiler
to optimize it to a shift instead of a divide. In addition,
the comment was cleaned up (mainly to remove the inaccurate
"1000 ms per 1 million blocks").
2) Removed the "erasing %lu blocks" printf. Higher levels
can print out advisory information if wanted. This matches
the other hardware dependent MMC drivers I looked at.
Change-Id: I9a03b93dc4adf3b6a4df34a1a2b592f6cad53a87
Signed-off-by: Scott Anderson <[email protected]>
1 file changed