From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 16 Feb 2015 12:01:34 +0100 Subject: [U-Boot] [u-boot 23/40] dwc3: core: added an API to invoke irq handlers In-Reply-To: <1423212497-11970-24-git-send-email-kishon@ti.com> References: <1423212497-11970-1-git-send-email-kishon@ti.com> <1423212497-11970-24-git-send-email-kishon@ti.com> Message-ID: <20150216120134.0fbdd0b9@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Kishon, > 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 > --- > drivers/usb/dwc3/core.c | 21 +++++++++++++++++++++ > include/dwc3-uboot.h | 1 + > 2 files changed, 22 insertions(+) > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index bd34dbd..5a8d5ea 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 "); > MODULE_LICENSE("GPL v2"); > diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h > index 272a020..09ff8a7 100644 > --- a/include/dwc3-uboot.h > +++ b/include/dwc3-uboot.h > @@ -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_ */ Reviewed-by: Lukasz Majewski -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group