]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: s3c-hsotg: add DAINT masking
authorRobert Baldyga <r.baldyga@samsung.com>
Thu, 19 Sep 2013 09:50:20 +0000 (11:50 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Oct 2013 13:43:34 +0000 (08:43 -0500)
In OEPInt/IEPInt interrupts handling added bitwise and of DAINT and
DAINTMSK, because we should handle masked interrupts only.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/s3c-hsotg.c

index 30cead183d50ccbe9fe6022258fa9e369d4eacab..8d71a9b0900581f88a9ebd2d0017c57debf0e7d0 100644 (file)
@@ -2433,10 +2433,14 @@ irq_retry:
 
        if (gintsts & (GINTSTS_OEPInt | GINTSTS_IEPInt)) {
                u32 daint = readl(hsotg->regs + DAINT);
-               u32 daint_out = daint >> DAINT_OutEP_SHIFT;
-               u32 daint_in = daint & ~(daint_out << DAINT_OutEP_SHIFT);
+               u32 daintmsk = readl(hsotg->regs + DAINTMSK);
+               u32 daint_out, daint_in;
                int ep;
 
+               daint &= daintmsk;
+               daint_out = daint >> DAINT_OutEP_SHIFT;
+               daint_in = daint & ~(daint_out << DAINT_OutEP_SHIFT);
+
                dev_dbg(hsotg->dev, "%s: daint=%08x\n", __func__, daint);
 
                for (ep = 0; ep < 15 && daint_out; ep++, daint_out >>= 1) {