From: Tony Lindgren Date: Mon, 11 Jun 2007 07:48:00 +0000 (-0700) Subject: musb_hdrc: Mask tusb interrupts while being handled X-Git-Tag: v2.6.22-omap1~55 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1805bf9f15539e25cf68aa31cb6cb34fafe00600;p=linux-2.6-omap-h63xx.git musb_hdrc: Mask tusb interrupts while being handled This should allow using both edge or level GPIO interrupts. Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 21defbb7499..0029724c4ee 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -722,10 +722,14 @@ static irqreturn_t tusb_interrupt(int irq, void *__hci) struct musb *musb = __hci; void __iomem *base = musb->ctrl_base; unsigned long flags; - u32 int_src; + u32 int_mask, int_src; spin_lock_irqsave(&musb->Lock, flags); + /* Mask all interrupts to allow using both edge and level GPIO irq */ + int_mask = musb_readl(base, TUSB_INT_MASK); + musb_writel(base, TUSB_INT_MASK, ~TUSB_INT_MASK_RESERVED_BITS); + int_src = musb_readl(base, TUSB_INT_SRC) & ~TUSB_INT_SRC_RESERVED_BITS; DBG(3, "TUSB IRQ %08x\n", int_src); @@ -813,6 +817,8 @@ static irqreturn_t tusb_interrupt(int irq, void *__hci) int_src & ~TUSB_INT_MASK_RESERVED_BITS); musb_platform_try_idle(musb); + + musb_writel(base, TUSB_INT_MASK, int_mask); spin_unlock_irqrestore(&musb->Lock, flags); return IRQ_HANDLED;