mmc: Add some helper functions for retrying on error
authorSean Anderson <seanga2@gmail.com>
Sat, 17 Oct 2020 12:36:27 +0000 (08:36 -0400)
committerPeng Fan <peng.fan@nxp.com>
Sat, 28 Nov 2020 02:39:44 +0000 (10:39 +0800)
commitda129170600e33bdcea1762ebe4ea0a2c9312a9e
treeaf1a9e9cfbb06107a215bb05151f44d7c618c62e
parent7889951d0f56eab746a7c8fde350a022ba0361ca
mmc: Add some helper functions for retrying on error

All of the existing quirks add retries to various calls of mmc_send_cmd.
mmc_send_cmd_quirks is a helper function to do this retrying behavior. It
checks if quirks mode is enabled, and if a specific quirk is activated it
retries on error.

This also adds mmc_send_cmd_retry, which retries on error every time
(instead of if a quirk is activated).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc.c