[PATCH 2/4] usb: dwc2: gadget: Remove duplicated FIFO initialization.

From: Sevak Arakelyan
Date: Wed Apr 26 2017 - 15:23:54 EST


dwc2_hsotg_init is called in dwc2_hsotg_core_init_disconnected and
dwc2_hsotg_init functions. It should be in
dwc2_hsotg_core_init_disconnected and don't need to be called for
the second time, so remove the duplicated one from dwc2_hsotg_init.
Also, remove useless debug prints.

Signed-off-by: Sevak Arakelyan <sevaka@xxxxxxxxxxxx>
---
drivers/usb/dwc2/gadget.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 0b2d9bf43283..46f38604c3b2 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -4214,14 +4214,6 @@ static void dwc2_hsotg_init(struct dwc2_hsotg *hsotg)
/* Be in disconnected state until gadget is registered */
__orr32(hsotg->regs + DCTL, DCTL_SFTDISCON);

- /* setup fifos */
-
- dev_dbg(hsotg->dev, "GRXFSIZ=0x%08x, GNPTXFSIZ=0x%08x\n",
- dwc2_readl(hsotg->regs + GRXFSIZ),
- dwc2_readl(hsotg->regs + GNPTXFSIZ));
-
- dwc2_hsotg_init_fifo(hsotg);
-
/* keep other bits untouched (so e.g. forced modes are not lost) */
usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
usbcfg &= ~(GUSBCFG_TOUTCAL_MASK | GUSBCFG_PHYIF16 | GUSBCFG_SRPCAP |
--
2.11.0