[PATCH 02/10] staging: dwc2: do not handle PRTINT in dwc2_handle_common_intr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For host mode, this interrupt is already handled by the hcd interrupt
handler. The common interrupt handler additionally did a noop handling
(it only cleared the flag and nothing else) when in device mode.

Since the driver currently supports only host mode, this shouldn't
result in any behaviour change in the driver. When device mode is
implemented later on, this interrupt should be properly handled by the
device interupt handler, if needed.

This change allows to make a clean cut between common interrupts and
host interrupts, since there are no longer any interrupts handled by
both.

Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx>
---
 drivers/staging/dwc2/core_intr.c | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/dwc2/core_intr.c b/drivers/staging/dwc2/core_intr.c
index 44c0166..73d48a5 100644
--- a/drivers/staging/dwc2/core_intr.c
+++ b/drivers/staging/dwc2/core_intr.c
@@ -403,8 +403,7 @@ static void dwc2_handle_usb_suspend_intr(struct dwc2_hsotg *hsotg)
 #define GINTMSK_COMMON	(GINTSTS_WKUPINT | GINTSTS_SESSREQINT |		\
 			 GINTSTS_CONIDSTSCHNG | GINTSTS_OTGINT |	\
 			 GINTSTS_MODEMIS | GINTSTS_DISCONNINT |		\
-			 GINTSTS_USBSUSP | GINTSTS_RESTOREDONE |	\
-			 GINTSTS_PRTINT)
+			 GINTSTS_USBSUSP | GINTSTS_RESTOREDONE)
 
 /*
  * This function returns the Core Interrupt register
@@ -460,7 +459,7 @@ irqreturn_t dwc2_handle_common_intr(int irq, void *dev)
 	spin_lock(&hsotg->lock);
 
 	gintsts = dwc2_read_common_intr(hsotg);
-	if (gintsts & ~GINTSTS_PRTINT)
+	if (gintsts)
 		retval = 1;
 
 	if (gintsts & GINTSTS_MODEMIS)
@@ -484,20 +483,6 @@ irqreturn_t dwc2_handle_common_intr(int irq, void *dev)
 		dev_dbg(hsotg->dev, " --Restore done interrupt received--\n");
 	}
 
-	if (gintsts & GINTSTS_PRTINT) {
-		/*
-		 * The port interrupt occurs while in device mode with HPRT0
-		 * Port Enable/Disable
-		 */
-		if (dwc2_is_device_mode(hsotg)) {
-			dev_dbg(hsotg->dev,
-				" --Port interrupt received in Device mode--\n");
-			gintsts = GINTSTS_PRTINT;
-			writel(gintsts, hsotg->regs + GINTSTS);
-			retval = 1;
-		}
-	}
-
 	spin_unlock(&hsotg->lock);
 out:
 	return IRQ_RETVAL(retval);
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux