[RFC PATCH 28/41] staging: dwc2: introduce GINTMSK_HOST macro

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

 



This simply defines a list of interrupts handled by the the host
interrupt handler.

Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx>
---
 drivers/staging/dwc2/core.c | 4 +---
 drivers/staging/dwc2/core.h | 4 ++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index a3b8556..ab6844c 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -480,9 +480,7 @@ void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg)
 	u32 intmsk = readl(hsotg->regs + GINTMSK);
 
 	/* Disable host mode interrupts without disturbing common interrupts */
-	intmsk &= ~(GINTSTS_SOF | GINTSTS_PRTINT | GINTSTS_HCHINT |
-		    GINTSTS_PTXFEMP | GINTSTS_NPTXFEMP | GINTSTS_RXFLVL |
-		    GINTSTS_I2CINT);
+	intmsk &= ~(GINTMSK_HOST);
 	writel(intmsk, hsotg->regs + GINTMSK);
 }
 
diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h
index 0fa479e..aed18e1 100644
--- a/drivers/staging/dwc2/core.h
+++ b/drivers/staging/dwc2/core.h
@@ -757,4 +757,8 @@ extern u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg);
 			 GINTSTS_MODEMIS | GINTSTS_DISCONNINT | \
 			 GINTSTS_USBSUSP | GINTSTS_RESTOREDONE)
 
+#define GINTMSK_HOST	(GINTSTS_SOF | GINTSTS_RXFLVL | GINTSTS_NPTXFEMP | \
+			 GINTSTS_I2CINT | GINTSTS_PRTINT | GINTSTS_HCHINT | \
+			 GINTSTS_PTXFEMP)
+
 #endif /* __DWC2_CORE_H__ */
-- 
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