mmc: mediatek: wait dma stop bit reset to 0
authorMengqi Zhang <mengqi.zhang@mediatek.com>
Thu, 9 Jun 2022 11:22:39 +0000 (19:22 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 15 Jun 2022 17:05:56 +0000 (10:05 -0700)
commit89bcd9a64b849380ef57e3032b307574e48db524
tree95dffd051ff68c23a150a14b6384ab08ae77bc59
parente591fcf6b4e39335c9b128b17738fcd2fdd278ae
mmc: mediatek: wait dma stop bit reset to 0

MediaTek IP requires that after dma stop, it need to wait this dma stop
bit auto-reset to 0. When bus is in high loading state, it will take a
while for the dma stop complete. If there is no waiting operation here,
when program runs to clear fifo and reset, bus will hang.

In addition, there should be no return in msdc_data_xfer_next() if
there is data need be transferred, because no matter what error occurs
here, it should continue to excute to the following mmc_request_done.
Otherwise the core layer may wait complete forever.

Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220609112239.18911-1-mengqi.zhang@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c