Commit b1b912ddf3041627e99899cfc09e015a54f9910e
1 parent
51637afe98
Exists in
v2017.01-smarct4x
and in
37 other branches
sunxi: otg: Fix peripheral mode
Peripheral mode needs us to signal vusb high to the phy for it to work, just like the host mode does. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff
drivers/usb/musb-new/sunxi.c
... | ... | @@ -145,16 +145,6 @@ |
145 | 145 | musb_writel(base, USBC_REG_o_ISCR, reg_val); |
146 | 146 | } |
147 | 147 | |
148 | -static void USBC_ForceVbusValidDisable(__iomem void *base) | |
149 | -{ | |
150 | - u32 reg_val; | |
151 | - | |
152 | - reg_val = musb_readl(base, USBC_REG_o_ISCR); | |
153 | - reg_val &= ~(0x03 << USBC_BP_ISCR_FORCE_VBUS_VALID); | |
154 | - reg_val = USBC_WakeUp_ClearChangeDetect(reg_val); | |
155 | - musb_writel(base, USBC_REG_o_ISCR, reg_val); | |
156 | -} | |
157 | - | |
158 | 148 | static void USBC_ForceVbusValidToHigh(__iomem void *base) |
159 | 149 | { |
160 | 150 | u32 reg_val; |
161 | 151 | |
162 | 152 | |
... | ... | @@ -248,12 +238,11 @@ |
248 | 238 | if (is_host_enabled(musb)) { |
249 | 239 | /* Host mode */ |
250 | 240 | USBC_ForceIdToLow(musb->mregs); |
251 | - USBC_ForceVbusValidToHigh(musb->mregs); | |
252 | 241 | } else { |
253 | 242 | /* Peripheral mode */ |
254 | 243 | USBC_ForceIdToHigh(musb->mregs); |
255 | - USBC_ForceVbusValidDisable(musb->mregs); | |
256 | 244 | } |
245 | + USBC_ForceVbusValidToHigh(musb->mregs); | |
257 | 246 | |
258 | 247 | return 0; |
259 | 248 | } |