usb: dwc2: gadget: don't erase gahbcfg register when enabling dma
authorGregory Herrero <gregory.herrero@intel.com>
Fri, 9 Jan 2015 12:38:47 +0000 (13:38 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 21:32:59 +0000 (15:32 -0600)
Do a read-modify-write instead of only setting DMAEn bit.

Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c

index b69b8fa817792ad6f7570c8c7b2476de2b9874d5..b98622f2092dcf9bc58246fc35ab0edf5b726aa5 100644 (file)
@@ -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);
 }
 
 /**