mmc: mmci: stm32: Check when the voltage switch procedure should be done
authorChristophe Kerello <christophe.kerello@foss.st.com>
Thu, 1 Jul 2021 14:33:53 +0000 (16:33 +0200)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:35:53 +0000 (08:35 -0400)
commit8f499a90e7eecafd44e8206a3ab586d024930485
treee2839725e5d738fad75ad3d318cb9d8c9c04bb13
parentf8dac276a9b4b915ba959964e92e317616c89483
mmc: mmci: stm32: Check when the voltage switch procedure should be done

[ Upstream commit d8e193f13b07e6c0ffaa1a999386f1989f2b4c5e ]

If the card has not been power cycled, it may still be using 1.8V
signaling. This situation is detected in mmc_sd_init_card function and
should be handled in mmci stm32 variant.  The host->pwr_reg variable is
also correctly protected with spin locks.

Fixes: 94b94a93e355 ("mmc: mmci_sdmmc: Implement signal voltage callbacks")
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210701143353.13188-1-yann.gautier@foss.st.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mmci_stm32_sdmmc.c