Lines Matching +full:reset +full:- +full:delay
3 * (C) Copyright 2004-2008
11 * SPDX-License-Identifier: GPL-2.0+
21 #include <asm/ehci-omap.h>
34 rev = readl(&uhh->rev); in omap_uhh_reset()
36 /* Soft RESET */ in omap_uhh_reset()
37 writel(OMAP_UHH_SYSCONFIG_SOFTRESET, &uhh->sysc); in omap_uhh_reset()
41 /* Wait for soft RESET to complete */ in omap_uhh_reset()
42 while (!(readl(&uhh->syss) & 0x1)) { in omap_uhh_reset()
44 printf("%s: RESET timeout\n", __func__); in omap_uhh_reset()
45 return -1; in omap_uhh_reset()
51 /* Set No-Idle, No-Standby */ in omap_uhh_reset()
52 writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc); in omap_uhh_reset()
59 /* Wait for soft RESET to complete */ in omap_uhh_reset()
60 while ((readl(&uhh->sysc) & 0x1)) { in omap_uhh_reset()
62 printf("%s: RESET timeout\n", __func__); in omap_uhh_reset()
63 return -1; in omap_uhh_reset()
69 writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc); in omap_uhh_reset()
80 /* perform TLL soft reset, and wait until reset is complete */ in omap_ehci_tll_reset()
81 writel(OMAP_USBTLL_SYSCONFIG_SOFTRESET, &usbtll->sysc); in omap_ehci_tll_reset()
83 /* Wait for TLL reset to complete */ in omap_ehci_tll_reset()
84 while (!(readl(&usbtll->syss) & OMAP_USBTLL_SYSSTATUS_RESETDONE)) in omap_ehci_tll_reset()
87 return -EL3RST; in omap_ehci_tll_reset()
98 reg = readl(&usbtll->channel_conf + port); in omap_usbhs_hsic_init()
106 writel(reg, &usbtll->channel_conf + port); in omap_usbhs_hsic_init()
114 ulpi_vp.viewport_addr = (u32)&ehci->insreg05_utmi_ulpi; in omap_ehci_soft_phy_reset()
129 /* controls PHY(s) reset signal(s) */
130 static inline void omap_ehci_phy_reset(int on, int delay) in omap_ehci_phy_reset() argument
134 * Hold the PHY in RESET for enough time till in omap_ehci_phy_reset()
137 if (delay && !on) in omap_ehci_phy_reset()
138 udelay(delay); in omap_ehci_phy_reset()
140 gpio_request(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO, "USB PHY1 reset"); in omap_ehci_phy_reset()
144 gpio_request(CONFIG_OMAP_EHCI_PHY2_RESET_GPIO, "USB PHY2 reset"); in omap_ehci_phy_reset()
148 gpio_request(CONFIG_OMAP_EHCI_PHY3_RESET_GPIO, "USB PHY3 reset"); in omap_ehci_phy_reset()
152 /* Hold the PHY in RESET for enough time till DIR is high */ in omap_ehci_phy_reset()
154 if (delay && on) in omap_ehci_phy_reset()
155 udelay(delay); in omap_ehci_phy_reset()
158 #define omap_ehci_phy_reset(on, delay) do {} while (0) argument
161 /* Reset is needed otherwise the kernel-driver will throw an error. */
168 return -1; in omap_ehci_hcd_stop()
171 return -1; in omap_ehci_hcd_stop()
178 * Based on "drivers/usb/host/ehci-omap.c" from Linux 3.1
193 /* Put the PHY in RESET */ in omap_ehci_hcd_init()
206 OMAP_USBTLL_SYSCONFIG_CACTIVITY, &usbtll->sysc); in omap_ehci_hcd_init()
209 writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc); in omap_ehci_hcd_init()
217 rev = readl(&uhh->rev); in omap_ehci_hcd_init()
219 if (is_ehci_phy_mode(usbhs_pdata->port_mode[0])) in omap_ehci_hcd_init()
224 if (is_ehci_phy_mode(usbhs_pdata->port_mode[1])) in omap_ehci_hcd_init()
229 if (is_ehci_phy_mode(usbhs_pdata->port_mode[2])) in omap_ehci_hcd_init()
240 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[0])) in omap_ehci_hcd_init()
243 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[1])) in omap_ehci_hcd_init()
256 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[0])) in omap_ehci_hcd_init()
259 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[1])) in omap_ehci_hcd_init()
262 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[2])) in omap_ehci_hcd_init()
267 writel(reg, &uhh->hostconfig); in omap_ehci_hcd_init()
270 if (is_ehci_hsic_mode(usbhs_pdata->port_mode[i])) in omap_ehci_hcd_init()
280 * This breaks suspend-resume if the root-hub is allowed in omap_ehci_hcd_init()
284 writel(EHCI_INSNREG04_DISABLE_UNSUSPEND, &ehci->insreg04); in omap_ehci_hcd_init()
287 if (is_ehci_phy_mode(usbhs_pdata->port_mode[i])) in omap_ehci_hcd_init()