aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2015-02-23 18:40:06 +0530
committerMarek Vasut2015-04-14 05:48:10 +0200
commit27d3b89d3362c912dccf1d9d27bcefc1e361fe19 (patch)
tree6f6eac7768f3f6a755e1dd068a7069e73dee8787 /drivers
parent793d347f5372edd4e5b6353df49fac77ce54031c (diff)
dwc3: core: added an API to invoke irq handlers
Since interrupt support is not present in u-boot, added an API to handle the interrupts in dwc3 core. This API can be polled to handle the interrupts. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/core.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index bd34dbd23c8..5a8d5ea8817 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -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");