aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c4
-rw-r--r--drivers/usb/otg/mxs-phy.c22
2 files changed, 16 insertions, 10 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 8391538d688b..a815fd2cc5e7 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4039,7 +4039,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
4039 goto fail; 4039 goto fail;
4040 4040
4041 if (hcd->phy && !hdev->parent) 4041 if (hcd->phy && !hdev->parent)
4042 usb_phy_notify_connect(hcd->phy, port1); 4042 usb_phy_notify_connect(hcd->phy, udev->speed);
4043 4043
4044 /* 4044 /*
4045 * Some superspeed devices have finished the link training process 4045 * Some superspeed devices have finished the link training process
@@ -4238,7 +4238,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
4238 if (udev) { 4238 if (udev) {
4239 if (hcd->phy && !hdev->parent && 4239 if (hcd->phy && !hdev->parent &&
4240 !(portstatus & USB_PORT_STAT_CONNECTION)) 4240 !(portstatus & USB_PORT_STAT_CONNECTION))
4241 usb_phy_notify_disconnect(hcd->phy, port1); 4241 usb_phy_notify_disconnect(hcd->phy, udev->speed);
4242 usb_disconnect(&hub->ports[port1 - 1]->child); 4242 usb_disconnect(&hub->ports[port1 - 1]->child);
4243 } 4243 }
4244 clear_bit(port1, hub->change_bits); 4244 clear_bit(port1, hub->change_bits);
diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
index 5b09f3339ded..9a3caeecc508 100644
--- a/drivers/usb/otg/mxs-phy.c
+++ b/drivers/usb/otg/mxs-phy.c
@@ -76,22 +76,28 @@ static void mxs_phy_shutdown(struct usb_phy *phy)
76 clk_disable_unprepare(mxs_phy->clk); 76 clk_disable_unprepare(mxs_phy->clk);
77} 77}
78 78
79static int mxs_phy_on_connect(struct usb_phy *phy, int port) 79static int mxs_phy_on_connect(struct usb_phy *phy,
80 enum usb_device_speed speed)
80{ 81{
81 dev_dbg(phy->dev, "Connect on port %d\n", port); 82 dev_dbg(phy->dev, "%s speed device has connected\n",
83 (speed == USB_SPEED_HIGH) ? "high" : "non-high");
82 84
83 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, 85 if (speed == USB_SPEED_HIGH)
84 phy->io_priv + HW_USBPHY_CTRL_SET); 86 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
87 phy->io_priv + HW_USBPHY_CTRL_SET);
85 88
86 return 0; 89 return 0;
87} 90}
88 91
89static int mxs_phy_on_disconnect(struct usb_phy *phy, int port) 92static int mxs_phy_on_disconnect(struct usb_phy *phy,
93 enum usb_device_speed speed)
90{ 94{
91 dev_dbg(phy->dev, "Disconnect on port %d\n", port); 95 dev_dbg(phy->dev, "%s speed device has disconnected\n",
96 (speed == USB_SPEED_HIGH) ? "high" : "non-high");
92 97
93 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, 98 if (speed == USB_SPEED_HIGH)
94 phy->io_priv + HW_USBPHY_CTRL_CLR); 99 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
100 phy->io_priv + HW_USBPHY_CTRL_CLR);
95 101
96 return 0; 102 return 0;
97} 103}