mmc: mediatek: Move cqhci init behind ungate clock
authorWenbin Mei <wenbin.mei@mediatek.com>
Thu, 28 Oct 2021 02:20:49 +0000 (10:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:48:19 +0000 (19:48 +0100)
commit12a46f72f4994cf17b1dd3d94d11094ea5a15f86
tree2203d29be80507abb2d62e80af25cf3695401c69
parent44c2bc2a6bbe6da262533c57969b14d1d1679c68
mmc: mediatek: Move cqhci init behind ungate clock

commit e8a1ff65927080278e6826f797b7c197fb2611a6 upstream.

We must enable clock before cqhci init, because crypto needs read
information from CQHCI registers, otherwise, it will hang in MediaTek mmc
host controller.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support")
Cc: stable@vger.kernel.org
Acked-by: Chaotian Jing <chaotian.jing@mediatek.com>
Link: https://lore.kernel.org/r/20211028022049.22129-1-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/mtk-sd.c