From: Gregory Herrero Date: Fri, 9 Jan 2015 12:38:47 +0000 (+0100) Subject: usb: dwc2: gadget: don't erase gahbcfg register when enabling dma X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5090044763fd954a002a6ef466fcbc21033518f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: dwc2: gadget: don't erase gahbcfg register when enabling dma Do a read-modify-write instead of only setting DMAEn bit. Tested-by: Robert Baldyga Acked-by: Paul Zimmerman Signed-off-by: Gregory Herrero Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index b69b8fa81779..b98622f2092d 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2827,8 +2827,8 @@ static void s3c_hsotg_init(struct dwc2_hsotg *hsotg) writel(GUSBCFG_PHYIF16 | GUSBCFG_TOUTCAL(7) | (0x5 << 10), hsotg->regs + GUSBCFG); - writel(using_dma(hsotg) ? GAHBCFG_DMA_EN : 0x0, - hsotg->regs + GAHBCFG); + if (using_dma(hsotg)) + __orr32(hsotg->regs + GAHBCFG, GAHBCFG_DMA_EN); } /**