summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_write.c
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2017-04-02 01:24:34 -0700
committerJaehoon Chung <jh80.chung@samsung.com>2017-04-14 15:23:14 +0900
commit7dde50d70787eb2faeced82d0c025762b12363ea (patch)
tree317c0770a9ef1b25f1f9ddac143a40d93d08f0e5 /drivers/mmc/mmc_write.c
parent4db2b61fcf206cb45753cd1f988a9b0aad92b561 (diff)
mmc: sdhci: Wait for SDHCI_INT_DATA_END when transferring.
sdhci_transfer_data() function transfers the blocks passed up to the number of blocks defined in mmc_data, but returns immediately once all the blocks are transferred, even if the loop exit condition is not met (bit SDHCI_INT_DATA_END set in the STATUS word). When doing multiple writes to mmc, returning right after the last block is transferred can cause the write to fail when sending the MMC_CMD_STOP_TRANSMISSION command right after the MMC_CMD_WRITE_MULTIPLE_BLOCK command, leaving the mmc driver in an unconsistent state until reboot. This error was observed in the rpi3 board. This patch waits for the SDHCI_INT_DATA_END bit to be set even after sending all the blocks. Test: Reliably wrote 2GiB of data to mmc in a rpi3. Signed-off-by: Alex Deymo <deymo@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/mmc_write.c')
0 files changed, 0 insertions, 0 deletions