Loading drivers/usb/dwc3/dwc3-msm.c +2 −0 Original line number Diff line number Diff line Loading @@ -3795,6 +3795,7 @@ static int dwc3_msm_host_notifier(struct notifier_block *nb, * ss phy to avoid turning on pipe clock during * these wake-ups. */ mdwc->ss_phy->flags |= PHY_WAKEUP_WA_EN; usb_phy_powerdown(mdwc->ss_phy); /* Loading @@ -3813,6 +3814,7 @@ static int dwc3_msm_host_notifier(struct notifier_block *nb, } } else { usb_phy_powerup(mdwc->ss_phy); mdwc->ss_phy->flags &= ~PHY_WAKEUP_WA_EN; /* set rate back to default core clk rate */ clk_set_rate(mdwc->core_clk, mdwc->core_clk_rate); dev_dbg(mdwc->dev, "set core clk rate %ld\n", Loading drivers/usb/host/xhci-hub.c +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/gfp.h> #include <linux/slab.h> #include <asm/unaligned.h> #include <linux/usb/phy.h> #include "xhci.h" #include "xhci-trace.h" Loading Loading @@ -945,6 +946,7 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, spin_lock_irqsave(&xhci->lock, flags); if (time_left) { usb_phy_powerdown(hcd->usb3_phy); slot_id = xhci_find_slot_id_by_port(hcd, xhci, wIndex + 1); if (!slot_id) { Loading Loading @@ -1310,6 +1312,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, /* unlock to execute stop endpoint commands */ spin_unlock_irqrestore(&xhci->lock, flags); xhci_stop_device(xhci, slot_id, 1); usb_phy_powerup(hcd->usb3_phy); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U3); Loading Loading @@ -1515,6 +1518,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U0); usb_phy_powerdown(hcd->usb3_phy); clear_bit(wIndex, &bus_state->resuming_ports); } bus_state->port_c_suspend |= 1 << wIndex; Loading drivers/usb/host/xhci-plat.c +11 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (device_property_read_u32(&pdev->dev, "usb-core-id", &xhci->core_id)) xhci->core_id = -EINVAL; hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); hcd->usb_phy = devm_usb_get_phy_by_phandle(pdev->dev.parent, "usb-phy", 0); if (IS_ERR(hcd->usb_phy)) { ret = PTR_ERR(hcd->usb_phy); if (ret == -EPROBE_DEFER) Loading @@ -359,6 +360,15 @@ static int xhci_plat_probe(struct platform_device *pdev) goto put_usb3_hcd; } hcd->usb3_phy = devm_usb_get_phy_by_phandle(pdev->dev.parent, "usb-phy", 1); if (IS_ERR(hcd->usb3_phy)) { ret = PTR_ERR(hcd->usb3_phy); if (ret == -EPROBE_DEFER) goto put_usb3_hcd; hcd->usb3_phy = NULL; } ret = usb_add_hcd(hcd, irq, IRQF_SHARED); if (ret) goto disable_usb_phy; Loading drivers/usb/phy/phy-msm-ssusb-qmp.c +9 −0 Original line number Diff line number Diff line Loading @@ -853,6 +853,15 @@ static int msm_ssphy_qmp_powerup(struct usb_phy *uphy, bool powerup) u8 reg = powerup ? 1 : 0; u8 temp; if (!(uphy->flags & PHY_WAKEUP_WA_EN)) return 0; temp = readl_relaxed(phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]); if (temp == powerup) return 0; writel_relaxed(reg, phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]); temp = readl_relaxed(phy->base + Loading include/linux/usb/hcd.h +1 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ struct usb_hcd { * other external phys should be software-transparent */ struct usb_phy *usb_phy; struct usb_phy *usb3_phy; struct phy *phy; /* Flags that need to be manipulated atomically because they can Loading Loading
drivers/usb/dwc3/dwc3-msm.c +2 −0 Original line number Diff line number Diff line Loading @@ -3795,6 +3795,7 @@ static int dwc3_msm_host_notifier(struct notifier_block *nb, * ss phy to avoid turning on pipe clock during * these wake-ups. */ mdwc->ss_phy->flags |= PHY_WAKEUP_WA_EN; usb_phy_powerdown(mdwc->ss_phy); /* Loading @@ -3813,6 +3814,7 @@ static int dwc3_msm_host_notifier(struct notifier_block *nb, } } else { usb_phy_powerup(mdwc->ss_phy); mdwc->ss_phy->flags &= ~PHY_WAKEUP_WA_EN; /* set rate back to default core clk rate */ clk_set_rate(mdwc->core_clk, mdwc->core_clk_rate); dev_dbg(mdwc->dev, "set core clk rate %ld\n", Loading
drivers/usb/host/xhci-hub.c +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/gfp.h> #include <linux/slab.h> #include <asm/unaligned.h> #include <linux/usb/phy.h> #include "xhci.h" #include "xhci-trace.h" Loading Loading @@ -945,6 +946,7 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, spin_lock_irqsave(&xhci->lock, flags); if (time_left) { usb_phy_powerdown(hcd->usb3_phy); slot_id = xhci_find_slot_id_by_port(hcd, xhci, wIndex + 1); if (!slot_id) { Loading Loading @@ -1310,6 +1312,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, /* unlock to execute stop endpoint commands */ spin_unlock_irqrestore(&xhci->lock, flags); xhci_stop_device(xhci, slot_id, 1); usb_phy_powerup(hcd->usb3_phy); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U3); Loading Loading @@ -1515,6 +1518,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, port_array, wIndex, XDEV_U0); usb_phy_powerdown(hcd->usb3_phy); clear_bit(wIndex, &bus_state->resuming_ports); } bus_state->port_c_suspend |= 1 << wIndex; Loading
drivers/usb/host/xhci-plat.c +11 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (device_property_read_u32(&pdev->dev, "usb-core-id", &xhci->core_id)) xhci->core_id = -EINVAL; hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); hcd->usb_phy = devm_usb_get_phy_by_phandle(pdev->dev.parent, "usb-phy", 0); if (IS_ERR(hcd->usb_phy)) { ret = PTR_ERR(hcd->usb_phy); if (ret == -EPROBE_DEFER) Loading @@ -359,6 +360,15 @@ static int xhci_plat_probe(struct platform_device *pdev) goto put_usb3_hcd; } hcd->usb3_phy = devm_usb_get_phy_by_phandle(pdev->dev.parent, "usb-phy", 1); if (IS_ERR(hcd->usb3_phy)) { ret = PTR_ERR(hcd->usb3_phy); if (ret == -EPROBE_DEFER) goto put_usb3_hcd; hcd->usb3_phy = NULL; } ret = usb_add_hcd(hcd, irq, IRQF_SHARED); if (ret) goto disable_usb_phy; Loading
drivers/usb/phy/phy-msm-ssusb-qmp.c +9 −0 Original line number Diff line number Diff line Loading @@ -853,6 +853,15 @@ static int msm_ssphy_qmp_powerup(struct usb_phy *uphy, bool powerup) u8 reg = powerup ? 1 : 0; u8 temp; if (!(uphy->flags & PHY_WAKEUP_WA_EN)) return 0; temp = readl_relaxed(phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]); if (temp == powerup) return 0; writel_relaxed(reg, phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]); temp = readl_relaxed(phy->base + Loading
include/linux/usb/hcd.h +1 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ struct usb_hcd { * other external phys should be software-transparent */ struct usb_phy *usb_phy; struct usb_phy *usb3_phy; struct phy *phy; /* Flags that need to be manipulated atomically because they can Loading