]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci_am654: Add workaround for card detect debounce timer
authorFaiz Abbas <faiz_abbas@ti.com>
Tue, 25 Aug 2020 17:00:15 +0000 (22:30 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Sep 2020 07:11:30 +0000 (09:11 +0200)
commite6407678b99d5825e74c94a7dda0bd7efc99e4d9
tree08e8a047e05596e9f7f49e686fd7aa6bb4bcae3f
parentdbdf36b9a62df10d0f61a8e897dfd92dd69c6711
mmc: sdhci_am654: Add workaround for card detect debounce timer

There is a one time delay because of a card detect debounce timer in the
controller IP. This timer runs as soon as power is applied to the module
regardless of whether a card is present or not and any writes to
SDHCI_POWER_ON will return 0 before it expires. This timeout has been
measured to be about 1 second in am654x and j721e.

Write-and-read-back in a loop on SDHCI_POWER_ON for a maximum of
1.5 seconds to make sure that the controller actually powers on.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Link: https://lore.kernel.org/r/20200825170015.32285-1-faiz_abbas@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci_am654.c