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)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Aug 2021 10:09:11 +0000 (12:09 +0200)
commitc9107dd0b851777d7e134420baf13a5c5343bc16
treeee73018541f74e1ffc3ecd97dd8a871cd8aa6b3b
parent67b13f3e221ed81b46a657e2b499bf8b20162476
mmc: sdhci-iproc: Cap min clock frequency on BCM2711

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