[PATCH 03/10] staging: dwc2: move some interrupt enabling around

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

 



Before, the DISCONNINT interrupt was enabled in
dwc2_enable_host_interrupts, but handled in dwc2_handle_common_intr,
while the RXFLVL interrupt was enabled in dwc2_enable_commont_interrupts
and handled in dwc_handle_hcd_intr.

This moves the enabling of these interrupts around to match the spot
where they are handled.

Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx>
---
 drivers/staging/dwc2/core.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 3177db2..da9ff3a 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -73,10 +73,7 @@ static void dwc2_enable_common_interrupts(struct dwc2_hsotg *hsotg)
 	writel(0xffffffff, hsotg->regs + GINTSTS);
 
 	/* Enable the interrupts in the GINTMSK */
-	intmsk = GINTSTS_MODEMIS | GINTSTS_OTGINT;
-
-	if (hsotg->core_params->dma_enable <= 0)
-		intmsk |= GINTSTS_RXFLVL;
+	intmsk = GINTSTS_DISCONNINT | GINTSTS_MODEMIS | GINTSTS_OTGINT;
 
 	intmsk |= GINTSTS_CONIDSTSCHNG | GINTSTS_WKUPINT | GINTSTS_USBSUSP |
 		  GINTSTS_SESSREQINT;
@@ -482,7 +479,11 @@ void dwc2_enable_host_interrupts(struct dwc2_hsotg *hsotg)
 
 	/* Enable host mode interrupts without disturbing common interrupts */
 	intmsk = readl(hsotg->regs + GINTMSK);
-	intmsk |= GINTSTS_DISCONNINT | GINTSTS_PRTINT | GINTSTS_HCHINT;
+	intmsk |= GINTSTS_PRTINT | GINTSTS_HCHINT;
+
+	if (hsotg->core_params->dma_enable <= 0)
+		intmsk |= GINTSTS_RXFLVL;
+
 	writel(intmsk, hsotg->regs + GINTMSK);
 }
 
@@ -497,7 +498,7 @@ void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg)
 
 	/* Disable host mode interrupts without disturbing common interrupts */
 	intmsk &= ~(GINTSTS_SOF | GINTSTS_PRTINT | GINTSTS_HCHINT |
-		    GINTSTS_PTXFEMP | GINTSTS_NPTXFEMP);
+		    GINTSTS_PTXFEMP | GINTSTS_NPTXFEMP | GINTSTS_RXFLVL);
 	writel(intmsk, hsotg->regs + GINTMSK);
 }
 
-- 
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