mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/staging/dedeckeh.git] / target / linux / bcm4908 / patches-5.4 / 084-v5.6-0012-phy-usb-USB-driver-is-crashing-during-S3-resume-on-7.patch
1 From 5dfe1cec580829faa49842672a25481b104c26ef Mon Sep 17 00:00:00 2001
2 From: Al Cooper <alcooperx@gmail.com>
3 Date: Fri, 3 Jan 2020 13:18:10 -0500
4 Subject: [PATCH] phy: usb: USB driver is crashing during S3 resume on 7216
5
6 This is a result of the USB 2.0 clocks not being disabled/enabled
7 during suspend/resume on XHCI only systems.
8
9 Signed-off-by: Al Cooper <alcooperx@gmail.com>
10 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
11 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
12 ---
13 drivers/phy/broadcom/phy-brcm-usb.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/phy/broadcom/phy-brcm-usb.c
17 +++ b/drivers/phy/broadcom/phy-brcm-usb.c
18 @@ -543,7 +543,7 @@ static int brcm_usb_phy_suspend(struct d
19 brcm_usb_wake_enable(&priv->ini, true);
20 if (priv->phys[BRCM_USB_PHY_3_0].inited)
21 clk_disable_unprepare(priv->usb_30_clk);
22 - if (priv->phys[BRCM_USB_PHY_2_0].inited)
23 + if (priv->phys[BRCM_USB_PHY_2_0].inited || !priv->has_eohci)
24 clk_disable_unprepare(priv->usb_20_clk);
25 if (priv->wake_irq >= 0)
26 enable_irq_wake(priv->wake_irq);