All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable" has been added to the 4.14-stable tree
@ 2018-03-22 13:30 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-22 13:30 UTC (permalink / raw)
  To: zjwu, adrian.hunter, alexander.levin, gregkh, ulf.hansson
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mmc-sdhci-xenon-wait-5ms-after-set-1.8v-signal-enable.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Mar 22 14:26:48 CET 2018
From: Zhoujie Wu <zjwu@marvell.com>
Date: Mon, 18 Dec 2017 14:38:47 -0800
Subject: mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable

From: Zhoujie Wu <zjwu@marvell.com>


[ Upstream commit 8d876bf472dba73c015cea9feea80dcb80626a7c ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/mmc/host/sdhci-xenon.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -230,7 +230,14 @@ static void xenon_set_power(struct sdhci
 		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
 }
 
+static void xenon_voltage_switch(struct sdhci_host *host)
+{
+	/* Wait for 5ms after set 1.8V signal enable bit */
+	usleep_range(5000, 5500);
+}
+
 static const struct sdhci_ops sdhci_xenon_ops = {
+	.voltage_switch		= xenon_voltage_switch,
 	.set_clock		= sdhci_set_clock,
 	.set_power		= xenon_set_power,
 	.set_bus_width		= sdhci_set_bus_width,


Patches currently in stable-queue which might be from zjwu@marvell.com are

queue-4.14/mmc-sdhci-xenon-wait-5ms-after-set-1.8v-signal-enable.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-22 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 13:30 Patch "mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable" has been added to the 4.14-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.