mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 16 Dec 2021 12:57:44 +0000 (13:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:50 +0000 (11:04 +0100)
commit1ee70b4c5406711c563a8146b96e079592a4e0b9
tree5158aa0253d8d0bfc11e0fd2aed14ad847148b90
parentdcedcbe177397122582e9e09b2ada9fdf9596409
mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling

[ Upstream commit ffaea6ebfe9ce06ebb3a54811a47688f2b0893cd ]

Replace all instances of open-coded while loops for polling registers
with calls to readl_poll_timeout() and, while at it, also fix some
possible infinite loop instances.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20211216125748.179602-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mtk-sd.c