]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/host/xhci-fsl.c
sunxi: H3: Do not clear usb companion clk-gate / reset on remove
[karo-tx-uboot.git] / drivers / usb / host / xhci-fsl.c
index 385422aed657160356791215d25411f99a858627..05f09d7600b803a183709121eeed33d1d21bb840 100644 (file)
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <usb.h>
 #include <asm-generic/errno.h>
-#include <asm/arch-ls102xa/immap_ls102xa.h>
 #include <linux/compat.h>
 #include <linux/usb/xhci-fsl.h>
 #include <linux/usb/dwc3.h>
@@ -28,23 +27,6 @@ __weak int __board_usb_init(int index, enum usb_init_type init)
        return 0;
 }
 
-void usb_phy_reset(struct dwc3 *dwc3_reg)
-{
-       /* Assert USB3 PHY reset */
-       setbits_le32(&dwc3_reg->g_usb3pipectl[0], DWC3_GUSB3PIPECTL_PHYSOFTRST);
-
-       /* Assert USB2 PHY reset */
-       setbits_le32(&dwc3_reg->g_usb2phycfg, DWC3_GUSB2PHYCFG_PHYSOFTRST);
-
-       mdelay(200);
-
-       /* Clear USB3 PHY reset */
-       clrbits_le32(&dwc3_reg->g_usb3pipectl[0], DWC3_GUSB3PIPECTL_PHYSOFTRST);
-
-       /* Clear USB2 PHY reset */
-       clrbits_le32(&dwc3_reg->g_usb2phycfg, DWC3_GUSB2PHYCFG_PHYSOFTRST);
-}
-
 static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci)
 {
        int ret = 0;
@@ -58,6 +40,9 @@ static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci)
        /* We are hard-coding DWC3 core to Host Mode */
        dwc3_set_mode(fsl_xhci->dwc3_reg, DWC3_GCTL_PRTCAP_HOST);
 
+       /* Set GFLADJ_30MHZ as 20h as per XHCI spec default value */
+       dwc3_set_fladj(fsl_xhci->dwc3_reg, GFLADJ_30MHZ_DEFAULT);
+
        return ret;
 }