]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sdhci-xenon: add timeout for PHY init complete
authorElad Nachman <enachman@marvell.com>
Thu, 22 Feb 2024 19:17:14 +0000 (21:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:48:41 +0000 (14:48 +0000)
commitb4eacb32e066278ef1fbc96eed5dc1d6a29c824f
tree9c56cc2417f852946574932014966d9c4da0fd9f
parent4344444255a3ba7f0a159953ba7e2f5dc2ed5f17
mmc: sdhci-xenon: add timeout for PHY init complete

commit 09e23823ae9a3e2d5d20f2e1efe0d6e48cef9129 upstream.

AC5X spec says PHY init complete bit must be polled until zero.
We see cases in which timeout can take longer than the standard
calculation on AC5X, which is expected following the spec comment above.
According to the spec, we must wait as long as it takes for that bit to
toggle on AC5X.
Cap that with 100 delay loops so we won't get stuck forever.

Fixes: 06c8b667ff5b ("mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC")
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Elad Nachman <enachman@marvell.com>
Link: https://lore.kernel.org/r/20240222191714.1216470-3-enachman@marvell.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-xenon-phy.c