]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mmc: Restructure polling loops to avoid extra delays
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Thu, 19 Mar 2015 12:44:06 +0000 (07:44 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:36:35 +0000 (22:36 +0200)
commit56d71cb21fd5a94db1bfd31431068f7d1e377204
treea4ecb992e9e9ee29a8fabdf3f39080a8da3f57fd
parent43ebd6dc166b8d3c7124d56f1f87695f56cae40d
mmc: Restructure polling loops to avoid extra delays

The polling loops in sd_send_op_cond and mmc_complete_op_cond functions
check the ready flag state at the end of the loop, that is after executing
a delay inside the loop, which, in case of exiting with no error,
is not needed. Also, one of these loops, as well as the loop
in mmc_send_status, have the delay just before exiting on timeout
conditions.

Restructure all these loops to check the respective conditions before making
a delay for the next loop pass, and to appropriately exit without the delay.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
drivers/mmc/mmc.c