mmc: sdhci-of-at91: wait for calibration done before proceed
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Fri, 24 Sep 2021 08:28:50 +0000 (11:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 08:04:23 +0000 (10:04 +0200)
commit3a0feae5f642258f6a217560a2d8f8a773e79cf0
treeccc8ca59603b7da06a7677ccf9670a310e3dffb5
parente5cb3680b958ed3eb66504c0865f767d760cc9cd
mmc: sdhci-of-at91: wait for calibration done before proceed

commit af467fad78f03a42de8b72190f6a595366b870db upstream.

Datasheet specifies that at the end of calibration the SDMMC_CALCR_EN
bit will be cleared. No commands should be send before calibration is
done.

Fixes: dbdea70f71d67 ("mmc: sdhci-of-at91: fix CALCR register being rewritten")
Fixes: 727d836a375ad ("mmc: sdhci-of-at91: add DT property to enable calibration on full reset")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210924082851.2132068-2-claudiu.beznea@microchip.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-of-at91.c