static void ci13xxx_msm_reset(struct ci13xxx* ci) { struct usb_phy *phy = ci->transceiver; struct device *dev = ci->gadget.dev.parent; writel_relaxed(0, USB_AHBBURST); writel_relaxed(0x08, USB_AHBMODE); if (ci->gadget.l1_supported) ci13xxx_msm_set_l1(ci); if (phy && (phy->flags & ENABLE_SECONDARY_PHY)) { int temp; dev_dbg(dev, "using secondary hsphy\n"); temp = readl_relaxed(USB_PHY_CTRL2); temp |= (1<<16); writel_relaxed(temp, USB_PHY_CTRL2); /* * Add memory barrier to make sure above LINK writes are * complete before moving ahead with USB peripheral mode * enumeration. */ mb(); } }
static void ci13xxx_msm_reset(void) { struct ci13xxx *udc = _udc; struct usb_phy *phy = udc->transceiver; struct device *dev = udc->gadget.dev.parent; int temp; writel_relaxed(0, USB_AHBBURST); writel_relaxed(0x08, USB_AHBMODE); /* workaround for rx buffer collision issue */ temp = readl_relaxed(USB_GENCONFIG); temp &= ~GENCONFIG_TXFIFO_IDLE_FORCE_DISABLE; temp &= ~GENCONFIG_ULPI_SERIAL_EN; writel_relaxed(temp, USB_GENCONFIG); if (udc->gadget.l1_supported) ci13xxx_msm_set_l1(udc); if (phy && (phy->flags & ENABLE_SECONDARY_PHY)) { int temp; dev_dbg(dev, "using secondary hsphy\n"); temp = readl_relaxed(USB_PHY_CTRL2); temp |= (1<<16); writel_relaxed(temp, USB_PHY_CTRL2); /* * Add memory barrier to make sure above LINK writes are * complete before moving ahead with USB peripheral mode * enumeration. */ mb(); } }
static void ci13xxx_msm_reset(void) { struct ci13xxx *udc = _udc; struct usb_phy *phy = udc->transceiver; struct device *dev = udc->gadget.dev.parent; writel_relaxed(0, USB_AHBBURST); writel_relaxed(0x08, USB_AHBMODE); if (udc->gadget.l1_supported) ci13xxx_msm_set_l1(udc); if (phy && (phy->flags & ENABLE_SECONDARY_PHY)) { int temp; dev_dbg(dev, "using secondary hsphy\n"); temp = readl_relaxed(USB_PHY_CTRL2); temp |= (1<<16); writel_relaxed(temp, USB_PHY_CTRL2); /* */ mb(); } }