diff --git a/drivers/amlogic/usb/phy/phy-aml-new-usb-v2.h b/drivers/amlogic/usb/phy/phy-aml-new-usb-v2.h index a9c3ed170dc8..dd0784362105 100644 --- a/drivers/amlogic/usb/phy/phy-aml-new-usb-v2.h +++ b/drivers/amlogic/usb/phy/phy-aml-new-usb-v2.h @@ -23,4 +23,4 @@ extern int amlogic_new_usbphy_reset_v2(struct amlogic_usb_v2 *phy); extern int amlogic_new_usbphy_reset_phycfg_v2 (struct amlogic_usb_v2 *phy, int cnt); - +void set_usb_phy_host_tuning(int port, int default_val); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index f7f6a009cd61..96d8cc93ef0f 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4980,6 +4980,9 @@ loop: done: hub_port_disable(hub, port1, 1); +#ifdef CONFIG_AMLOGIC_USB2PHY + set_usb_phy_host_tuning(port1 - 1, 1); +#endif if (hcd->driver->relinquish_port && !hub->hdev->parent) { if (status != -ENOTCONN && status != -ENODEV) hcd->driver->relinquish_port(hcd, port1); diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 34c1a7e22aae..d82a20b7c686 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -124,6 +124,9 @@ extern int hub_port_debounce(struct usb_hub *hub, int port1, bool must_be_connected); extern int usb_clear_port_feature(struct usb_device *hdev, int port1, int feature); +#ifdef CONFIG_AMLOGIC_USB2PHY +void set_usb_phy_host_tuning(int port, int default_val); +#endif static inline bool hub_is_port_power_switchable(struct usb_hub *hub) {