summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-06-12 21:09:26 +0300
committerFelipe Balbi <balbi@ti.com>2013-07-29 13:56:58 +0300
commit68d6a01bdd2a9ebae858271129d0a8d4ae865e93 (patch)
treecaf277cfa788151226366a1711a6b7173079da85 /drivers/usb/dwc3/core.c
parentfb49740d72a305f2e4110b4dfb53fdd9130d8878 (diff)
downloadop-kernel-dev-68d6a01bdd2a9ebae858271129d0a8d4ae865e93.zip
op-kernel-dev-68d6a01bdd2a9ebae858271129d0a8d4ae865e93.tar.gz
usb: dwc3: core: introduce and use macros for Event Size register
That register has more than just the event buffer size; we can also mask and unmask that particular interrupter on bit 31 of that register. In this patch we introduce the necessary macros and make sure to use the new macros while also making sure we mask interrupts during driver removal. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 25d374c..dfbc1f0 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -218,7 +218,7 @@ static int dwc3_event_buffers_setup(struct dwc3 *dwc)
dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n),
upper_32_bits(evt->dma));
dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(n),
- evt->length & 0xffff);
+ DWC3_GEVNTSIZ_SIZE(evt->length));
dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(n), 0);
}
@@ -237,7 +237,8 @@ static void dwc3_event_buffers_cleanup(struct dwc3 *dwc)
dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n), 0);
dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n), 0);
- dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(n), 0);
+ dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(n), DWC3_GEVNTSIZ_INTMASK
+ | DWC3_GEVNTSIZ_SIZE(0));
dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(n), 0);
}
}
OpenPOWER on IntegriCloud