mmc: sdhci-iproc: Cap min clock frequency on BCM2711
authorNicolas Saenz Julienne <nsaenz@kernel.org>
Sat, 7 Aug 2021 11:06:35 +0000 (13:06 +0200)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:35:56 +0000 (08:35 -0400)
commit2566c1d8239da88c029d33e9737dc8567139a175
treef99eb5f28e1fad733641dfe2d6dc6d216c6d9b9d
parent110b7f72f6d0e01ab7d9b7690c203050d17d7f85
mmc: sdhci-iproc: Cap min clock frequency on BCM2711

[ Upstream commit c9107dd0b851777d7e134420baf13a5c5343bc16 ]

There is a known bug on BCM2711's SDHCI core integration where the
controller will hang when the difference between the core clock and the
bus clock is too great. Specifically this can be reproduced under the
following conditions:

- No SD card plugged in, polling thread is running, probing cards at
  100 kHz.
- BCM2711's core clock configured at 500MHz or more.

So set 200 kHz as the minimum clock frequency available for that board.

For more information on the issue see this:
https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1628334401-6577-5-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-iproc.c