usb: TOSHIBA Disk Can't Be Recognized on the Port of USB 2.0 [1/1]

PD#SWPL-14156

Problem:
TOSHIBA Disk can't be recognized on the Port of USB 2.0 and since then
any disk can't be recognized.This is because
that the CCS flag of the PORTSC is still set and if write 0
to 0x38 of usb phy register the CCS will change to
0 and so that other disks can be recognized.

Solution:
when the enumeration fails, call set_usb_phy_host_tuning.

Verify:
test pass on u212

Change-Id: I507f269afc825de75c7dcce5f79c9c1dd7793d84
Signed-off-by: he.he <he.he@amlogic.com>
This commit is contained in:
he.he
2019-09-09 22:48:17 -04:00
committed by Luke Go
parent a198dd1991
commit 43f4d2ccde
3 changed files with 7 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)
{