]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/dwc3/core.c
musb: Update usb-compat to work with struct usb_device without a parent ptr
[u-boot] / drivers / usb / dwc3 / core.c
index bd34dbd23c877e345da16daf58b73d7f31643ee1..ab3c94e51275764df2e8b965329de604cc3d32e7 100644 (file)
@@ -32,7 +32,7 @@
 static LIST_HEAD(dwc3_list);
 /* -------------------------------------------------------------------------- */
 
-void dwc3_set_mode(struct dwc3 *dwc, u32 mode)
+static void dwc3_set_mode(struct dwc3 *dwc, u32 mode)
 {
        u32 reg;
 
@@ -157,8 +157,8 @@ static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
        num = DWC3_NUM_INT(dwc->hwparams.hwparams1);
        dwc->num_event_buffers = num;
 
-       dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs) * num,
-                       GFP_KERNEL);
+       dwc->ev_buffs = memalign(CONFIG_SYS_CACHELINE_SIZE,
+                                sizeof(*dwc->ev_buffs) * num);
        if (!dwc->ev_buffs)
                return -ENOMEM;
 
@@ -758,6 +758,27 @@ void dwc3_uboot_exit(int index)
        }
 }
 
+/**
+ * dwc3_uboot_handle_interrupt - handle dwc3 core interrupt
+ * @index: index of this controller
+ *
+ * Invokes dwc3 gadget interrupts.
+ *
+ * Generally called from board file.
+ */
+void dwc3_uboot_handle_interrupt(int index)
+{
+       struct dwc3 *dwc = NULL;
+
+       list_for_each_entry(dwc, &dwc3_list, list) {
+               if (dwc->index != index)
+                       continue;
+
+               dwc3_gadget_uboot_handle_interrupt(dwc);
+               break;
+       }
+}
+
 MODULE_ALIAS("platform:dwc3");
 MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
 MODULE_LICENSE("GPL v2");