File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11
11
#include <linux/clk.h>
12
12
#include <linux/err.h>
13
13
#include <linux/usb/otg.h>
14
+ #include <linux/usb/of.h>
14
15
#include <linux/platform_data/mv_usb.h>
15
16
#include <linux/io.h>
16
17
@@ -67,6 +68,8 @@ static int mv_ehci_reset(struct usb_hcd *hcd)
67
68
{
68
69
struct device * dev = hcd -> self .controller ;
69
70
struct ehci_hcd_mv * ehci_mv = hcd_to_ehci_hcd_mv (hcd );
71
+ struct ehci_hcd * ehci = hcd_to_ehci (hcd );
72
+ u32 status ;
70
73
int retval ;
71
74
72
75
if (ehci_mv == NULL ) {
@@ -80,6 +83,14 @@ static int mv_ehci_reset(struct usb_hcd *hcd)
80
83
if (retval )
81
84
dev_err (dev , "ehci_setup failed %d\n" , retval );
82
85
86
+ if (of_usb_get_phy_mode (dev -> of_node ) == USBPHY_INTERFACE_MODE_HSIC ) {
87
+ status = ehci_readl (ehci , & ehci -> regs -> port_status [0 ]);
88
+ status |= PORT_TEST_FORCE ;
89
+ ehci_writel (ehci , status , & ehci -> regs -> port_status [0 ]);
90
+ status &= ~PORT_TEST_FORCE ;
91
+ ehci_writel (ehci , status , & ehci -> regs -> port_status [0 ]);
92
+ }
93
+
83
94
return retval ;
84
95
}
85
96
You can’t perform that action at this time.
0 commit comments