Skip to content

Commit 2b99b43

Browse files
committed
Revert "phy: apple: atc: Initialize USB2 PHY for host mode during probe"
This reverts commit eef91cd.
1 parent eef91cd commit 2b99b43

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

drivers/phy/apple/atc.c

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,8 +1788,12 @@ static int atcphy_configure(struct apple_atcphy *atcphy, enum atcphy_mode mode)
17881788
return 0;
17891789
}
17901790

1791-
static int _atcphy_usb2_set_mode(struct apple_atcphy *atcphy, enum phy_mode mode)
1791+
static int atcphy_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode)
17921792
{
1793+
struct apple_atcphy *atcphy = phy_get_drvdata(phy);
1794+
1795+
guard(mutex)(&atcphy->lock);
1796+
17931797
switch (mode) {
17941798
case PHY_MODE_USB_HOST:
17951799
set32(atcphy->regs.usb2phy + USB2PHY_SIG, USB2PHY_SIG_HOST);
@@ -1804,15 +1808,6 @@ static int _atcphy_usb2_set_mode(struct apple_atcphy *atcphy, enum phy_mode mode
18041808
return 0;
18051809
}
18061810

1807-
static int atcphy_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode)
1808-
{
1809-
struct apple_atcphy *atcphy = phy_get_drvdata(phy);
1810-
1811-
guard(mutex)(&atcphy->lock);
1812-
1813-
return _atcphy_usb2_set_mode(atcphy, mode);
1814-
}
1815-
18161811
static const struct phy_ops apple_atc_usb2_phy_ops = {
18171812
.owner = THIS_MODULE,
18181813
.set_mode = atcphy_usb2_set_mode,
@@ -2231,14 +2226,6 @@ static int atcphy_probe_finalize(struct apple_atcphy *atcphy)
22312226
/* Reset dwc3 on probe, let dwc3 (consumer) deassert it */
22322227
_atcphy_dwc3_reset_assert(atcphy);
22332228

2234-
/*
2235-
* Bring the USB2 up once in host mode. For not yet understood reasons
2236-
* this avoids not detecting USB devices on the initial cold or hot
2237-
* plug.
2238-
*/
2239-
atcphy_usb2_power_on(atcphy);
2240-
_atcphy_usb2_set_mode(atcphy, PHY_MODE_USB_HOST);
2241-
22422229
/* Reset atcphy to clear any state potentially left by the bootloader */
22432230
atcphy_usb2_power_off(atcphy);
22442231
atcphy_power_off(atcphy);

0 commit comments

Comments
 (0)