Hello.
On 06-04-2013 1:27, Matthijs Kooijman wrote:
This function disables all "common interrupts", i.e., those that are
handled by the common interrupt handler.
Signed-off-by: Matthijs Kooijman <[email protected]>
[...]
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 1cadb93..a3b8556 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -81,6 +81,20 @@ static void dwc2_enable_common_interrupts(struct dwc2_hsotg
*hsotg)
writel(intmsk, hsotg->regs + GINTMSK);
}
+/**
+ * dwc2_disable_common_interrupts() - Disables the common interrupts
+ *
+ * @hsotg: Programming view of DWC_otg controller
+ */
+void dwc2_disable_common_interrupts(struct dwc2_hsotg *hsotg)
+{
+ u32 intmsk = readl(hsotg->regs + GINTMSK);
+
+ /* Disable common interrupts without disturbing host mode interrupts */
+ intmsk &= ~(GINTMSK_COMMON);
Why () here? GINTMSK_COMMON already includes ().
[...]
diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h
index 2817b60..0fa479e 100644
--- a/drivers/staging/dwc2/core.h
+++ b/drivers/staging/dwc2/core.h
[...]
@@ -751,4 +752,9 @@ extern void dwc2_dump_global_registers(struct dwc2_hsotg
*hsotg);
*/
extern u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg);
+#define GINTMSK_COMMON (GINTSTS_WKUPINT | GINTSTS_SESSREQINT | \
+ GINTSTS_CONIDSTSCHNG | GINTSTS_OTGINT | \
+ GINTSTS_MODEMIS | GINTSTS_DISCONNINT | \
+ GINTSTS_USBSUSP | GINTSTS_RESTOREDONE)
+
#endif /* __DWC2_CORE_H__ */
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html