]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: dwc2: gadget: Set GDFIFOCFG
authorSevak Arakelyan <sevaka@synopsys.com>
Thu, 19 Jan 2017 02:34:19 +0000 (18:34 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Jan 2017 09:04:22 +0000 (11:04 +0200)
Add programming of GDFIFOCFG register in device mode.
It must contain start address for EP Info block and
total FIFO depth.

Signed-off-by: Sevak Arakelyan <sevaka@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index 6e00177da02b2635b0650df75b41841131710c1c..4e15ff2f59dba4e1406fd048dc5d49c37d355d7c 100644 (file)
@@ -241,6 +241,9 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
                val = dwc2_readl(hsotg->regs + DPTXFSIZN(ep));
        }
 
+       dwc2_writel(hsotg->hw_params.total_fifo_size |
+                   addr << GDFIFOCFG_EPINFOBASE_SHIFT,
+                   hsotg->regs + GDFIFOCFG);
        /*
         * according to p428 of the design guide, we need to ensure that
         * all fifos are flushed before continuing