Commit 816495299d1de613feea906389bf88c0faf29ebe

Authored by Ramon Fried
Committed by Tom Rini
1 parent 0683b27ae3

usb:ci_udc: Introduce init_after_reset phy function

MSM variant of Chipidea must reinitalize the phy
after controller reset.
Introduce ci_init_after_reset() weak function that
can be used to achieve the above init.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

drivers/usb/gadget/ci_udc.c
... ... @@ -104,6 +104,10 @@
104 104 .free_request = ci_ep_free_request,
105 105 };
106 106  
  107 +__weak void ci_init_after_reset(struct ehci_ctrl *ctrl)
  108 +{
  109 +}
  110 +
107 111 /* Init values for USB endpoints. */
108 112 static const struct usb_ep ci_ep_init[5] = {
109 113 [0] = { /* EP 0 */
... ... @@ -886,6 +890,8 @@
886 890 /* RESET */
887 891 writel(USBCMD_ITC(MICRO_8FRAME) | USBCMD_RST, &udc->usbcmd);
888 892 udelay(200);
  893 +
  894 + ci_init_after_reset(controller.ctrl);
889 895  
890 896 writel((unsigned long)controller.epts, &udc->epinitaddr);
891 897