]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit29abc7172c8a231a0e1650699937ba86282084ef
tree95dffd051ff68c23a150a14b6384ab08ae77bc59
parentc7f7bd637467befd1b2597b0a6e220d91d86cd0a
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