mmc: block: fix data timeout issue with ACMD22

If a multi block write operation fails for SD card, during
error handling we send the SD_APP_SEND_NUM_WR_BLKS (ACMD22)
to know how many blocks were already programmed by card.

But the mmc_sd_num_wr_blocks() function which sends the ACMD22
calculates the data timeout value from csd.tacc_ns and
csd.tacc_clks parameters which will be 0 for block addressed
(>2GB cards) SD card. This would result in timeout_ns and
timeout_clks being 0 in the mmc_request passed to host driver.
This means the host controller would program its data timeout
timer value with 0 which could result in DATA TIMEOUT errors
from controller.

To fix this issue, mmc_sd_num_wr_blocks() should instead
just call mmc_set_data_timeout() to calculate the
data timeout value. The mmc_set_data_timeout() function
ensures that a non zero timeout value is set even for
block addressed SD cards.

CRs-Fixed: 369655
Change-Id: I982dd4c42f88765e4964f11786339b17a88b11a6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
1 file changed