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)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 28 Dec 2021 16:21:14 +0000 (17:21 +0100)
commitffaea6ebfe9ce06ebb3a54811a47688f2b0893cd
tree41b3d7a872401b7947bc83c0f8bedc970d4d45dd
parent585cba9d424e6cd9eda50c3397280ac320cbf832
mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling

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>
drivers/mmc/host/mtk-sd.c