[PATCH 05/10] 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 2313f7c..8882270 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -497,9 +497,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 fc075a7..cc2f360 100644
--- a/drivers/staging/dwc2/core.h
+++ b/drivers/staging/dwc2/core.h
@@ -659,4 +659,8 @@ extern void dwc2_dump_global_registers(struct dwc2_hsotg *hsotg);
  */
 extern u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg);
 
+#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