@@ -108,22 +108,27 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc)
108
108
void dwc3_enable_susphy (struct dwc3 * dwc , bool enable )
109
109
{
110
110
u32 reg ;
111
+ int i ;
111
112
112
- reg = dwc3_readl (dwc -> regs , DWC3_GUSB3PIPECTL (0 ));
113
- if (enable && !dwc -> dis_u3_susphy_quirk )
114
- reg |= DWC3_GUSB3PIPECTL_SUSPHY ;
115
- else
116
- reg &= ~DWC3_GUSB3PIPECTL_SUSPHY ;
113
+ for (i = 0 ; i < dwc -> num_usb3_ports ; i ++ ) {
114
+ reg = dwc3_readl (dwc -> regs , DWC3_GUSB3PIPECTL (i ));
115
+ if (enable && !dwc -> dis_u3_susphy_quirk )
116
+ reg |= DWC3_GUSB3PIPECTL_SUSPHY ;
117
+ else
118
+ reg &= ~DWC3_GUSB3PIPECTL_SUSPHY ;
117
119
118
- dwc3_writel (dwc -> regs , DWC3_GUSB3PIPECTL (0 ), reg );
120
+ dwc3_writel (dwc -> regs , DWC3_GUSB3PIPECTL (i ), reg );
121
+ }
119
122
120
- reg = dwc3_readl (dwc -> regs , DWC3_GUSB2PHYCFG (0 ));
121
- if (enable && !dwc -> dis_u2_susphy_quirk )
122
- reg |= DWC3_GUSB2PHYCFG_SUSPHY ;
123
- else
124
- reg &= ~DWC3_GUSB2PHYCFG_SUSPHY ;
123
+ for (i = 0 ; i < dwc -> num_usb2_ports ; i ++ ) {
124
+ reg = dwc3_readl (dwc -> regs , DWC3_GUSB2PHYCFG (i ));
125
+ if (enable && !dwc -> dis_u2_susphy_quirk )
126
+ reg |= DWC3_GUSB2PHYCFG_SUSPHY ;
127
+ else
128
+ reg &= ~DWC3_GUSB2PHYCFG_SUSPHY ;
125
129
126
- dwc3_writel (dwc -> regs , DWC3_GUSB2PHYCFG (0 ), reg );
130
+ dwc3_writel (dwc -> regs , DWC3_GUSB2PHYCFG (i ), reg );
131
+ }
127
132
}
128
133
129
134
void dwc3_set_prtcap (struct dwc3 * dwc , u32 mode )
0 commit comments