]> git.dujemihanovic.xyz Git - linux.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)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 28 Feb 2024 12:41:35 +0000 (13:41 +0100)
commit09e23823ae9a3e2d5d20f2e1efe0d6e48cef9129
tree37cb377011f9563bb4af8ce9e35d828e146bb048
parent8e9f25a290ae0016353c9ea13314c95fb3207812
mmc: sdhci-xenon: add timeout for PHY init complete

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>
drivers/mmc/host/sdhci-xenon-phy.c