1
0
Fork 0

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>
utp
Kishon Vijay Abraham I 2015-02-23 18:40:06 +05:30 committed by Marek Vasut
parent 793d347f53
commit 27d3b89d33
2 changed files with 22 additions and 0 deletions

View File

@ -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");

View File

@ -38,4 +38,5 @@ struct dwc3_device {
int dwc3_uboot_init(struct dwc3_device *dev);
void dwc3_uboot_exit(int index);
void dwc3_uboot_handle_interrupt(int index);
#endif /* __DWC3_UBOOT_H_ */