@@ -958,6 +958,18 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->xhci_resources[1].flags = res->flags;
dwc->xhci_resources[1].name = res->name;
+ dwc->otg_irq = platform_get_irq_byname(pdev, "otg");
+ if (dwc->otg_irq < 0)
+ dwc->otg_irq = res->start;
+
+ dwc->gadget_irq = platform_get_irq_byname(pdev, "peripheral");
+ if (dwc->gadget_irq < 0)
+ dwc->gadget_irq = res->start;
+
+ dwc->xhci_irq = platform_get_irq_byname(pdev, "host");
+ if (dwc->xhci_irq < 0)
+ dwc->xhci_irq = res->start;
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "missing memory resource\n");
@@ -742,6 +742,9 @@ struct dwc3_scratchpad_array {
* @maximum_speed: maximum speed requested (mainly for testing purposes)
* @revision: revision register contents
* @dr_mode: requested mode of operation
+ * @xhci_irq: IRQ number for XHCI IRQs
+ * @gadget_irq: IRQ number for Peripheral IRQs
+ * @otg_irq: IRQ number for OTG IRQs
* @usb2_phy: pointer to USB2 PHY
* @usb3_phy: pointer to USB3 PHY
* @usb2_generic_phy: pointer to USB2 PHY
@@ -847,6 +850,10 @@ struct dwc3 {
enum usb_dr_mode dr_mode;
+ int gadget_irq;
+ int xhci_irq;
+ int otg_irq;
+
/* used for suspend/resume */
u32 dcfg;
u32 gctl;
@@ -1533,7 +1533,7 @@ static int dwc3_gadget_start(struct usb_gadget *g,
int irq;
u32 reg;
- irq = platform_get_irq(to_platform_device(dwc->dev), 0);
+ irq = dwc->gadget_irq;
ret = request_threaded_irq(irq, dwc3_interrupt, dwc3_thread_interrupt,
IRQF_SHARED, "dwc3", dwc);
if (ret) {