]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/linux/aarch64/0005-mmc-core-set-initial-signal-voltage-on-power-off.patch
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / src / patches / linux / aarch64 / 0005-mmc-core-set-initial-signal-voltage-on-power-off.patch
1 From dfacc132a5be8eb643495f8ca693fd59368cc262 Mon Sep 17 00:00:00 2001
2 From: Jonas Karlman <jonas@kwiboo.se>
3 Date: Sun, 17 Feb 2019 22:14:38 +0000
4 Subject: [PATCH 5/8] mmc: core: set initial signal voltage on power off
5
6 Some boards have SD card connectors where the power rail cannot be switched
7 off by the driver. If the card has not been power cycled, it may still be
8 using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
9 will fail to boot from a UHS card that continue to use 1.8V signaling.
10
11 Set initial signal voltage in mmc_power_off() to allow re-boot to function.
12
13 This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
14 same issue have been seen on some Rockchip RK3399 boards.
15
16 I am sending this as a RFC because I have no insights into SD/MMC subsystem,
17 this change fix a re-boot issue on my boards and does not break emmc/sdio.
18 Is this an acceptable workaround? Any advice is appreciated.
19
20 Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
21 ---
22 drivers/mmc/core/core.c | 8 ++++++++
23 1 file changed, 8 insertions(+)
24
25 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
26 index 3d3e0ca52614..33cb13b7bf88 100644
27 --- a/drivers/mmc/core/core.c
28 +++ b/drivers/mmc/core/core.c
29 @@ -1363,6 +1363,14 @@ void mmc_power_off(struct mmc_host *host)
30 if (host->ios.power_mode == MMC_POWER_OFF)
31 return;
32
33 + mmc_set_initial_signal_voltage(host);
34 +
35 + /*
36 + * This delay should be sufficient to allow the power supply
37 + * to reach the minimum voltage.
38 + */
39 + mmc_delay(host->ios.power_delay_ms);
40 +
41 mmc_pwrseq_power_off(host);
42
43 host->ios.clock = 0;
44 --
45 2.34.1
46