]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci: restore behavior when setting VDD via external regulator
authorJisheng Zhang <jszhang@marvell.com>
Fri, 11 Dec 2015 13:36:29 +0000 (21:36 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 28 Dec 2015 11:51:39 +0000 (12:51 +0100)
commit060f05b73ed6a17e98a522f53065fa13de98ee20
tree3f12f666e0b530fe26c646246cd52a99ec1f66f6
parentdbc82ff37106d874f2ec88f7dabe303c83f37ed1
mmc: sdhci: restore behavior when setting VDD via external regulator

After commit e7be6e003dfc ("mmc: sdhci: Improve external VDD regulator
support"), for the VDD is supplied via external regulators, we ignore
the code to convert a VDD voltage request into one of the standard
SDHCI voltage levels, then program it in the SDHCI_POWER_CONTROL. This
brings two issues:

1. SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk isn't handled properly any
more.

2. What's more, once SDHCI_POWER_ON bit is set, some controllers such
as the sdhci-pxav3 used in marvell berlin SoCs require the voltage
levels programming in the SDHCI_POWER_CONTROL register, even the VDD
is supplied by external regulator. So the host in marvell berlin SoCs
still works fine after the commit. However, commit 2698d06dccac ("mmc:
sdhci: Set SDHCI_POWER_ON with external vmmc") sets the SDHCI_POWER_ON
bit, this would make the host in marvell berlin SoCs won't work any
more with external vmmc.

This patch restores the behavior when setting VDD through external
regulator by moving the call of mmc_regulator_set_ocr() to the end
of sdhci_set_power() function.

After this patch, the sdcard on Marvell Berlin SoC boards work again.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Fixes: e7be6e003dfc ("mmc: sdhci: Improve external VDD ...")
Reviewed-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c