mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable
authorZhoujie Wu <zjwu@marvell.com>
Mon, 18 Dec 2017 22:38:47 +0000 (14:38 -0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 19 Dec 2017 07:53:04 +0000 (08:53 +0100)
commit8d876bf472dba73c015cea9feea80dcb80626a7c
treeb87bf1e70eca33bee4cef370e49b5c59c0dea0f7
parentc4ba0e4abda39fb1ca81683be068b4556b2680d4
mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable

According to SD spec 3.00 3.6.1 signal voltage switch
procedure step 6~8,
(6) Set 1.8V Signal Enable in the Host Control 2 register.
(7) Wait 5ms. 1.8V voltage regulator shall be stable within this period.
(8) If 1.8V Signal Enable is cleared by Host Controller, go to step (12).
Host should wait 5ms after set 1.8V signal enable bit in
Host Control 2 register and check if 1.8V is stable or not.

But current code checks this bit right after set it.
On some platforms with xenon controller found the bit is
cleared right away and host reports "1.8V regulator output
did not became stable" and 5ms delay can help.

Implement voltage_switch callback for xenon controller to add 5ms
delay to make sure the 1.8V signal enable bit is set by controller.

Signed-off-by: Zhoujie Wu <zjwu@marvell.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-xenon.c