summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/gadget.c
diff options
context:
space:
mode:
authorGregory Herrero <gregory.herrero@intel.com>2015-01-09 13:38:47 +0100
committerFelipe Balbi <balbi@ti.com>2015-01-12 15:32:59 -0600
commitf5090044763fd954a002a6ef466fcbc21033518f (patch)
tree26c905162d2e0121049596264f52a1d2d19c68e5 /drivers/usb/dwc2/gadget.c
parent5f05048e5473a0570b1db9c2828d2a469e8bbbee (diff)
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 <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>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r--drivers/usb/dwc2/gadget.c4
1 files changed, 2 insertions, 2 deletions
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);
}
/**