Lines Matching full:esc

197 phy_init(struct vybrid_ehci_softc *esc)  in phy_init()  argument
203 reg = PHY_READ4(esc, USBPHY_CTRL); in phy_init()
205 PHY_WRITE4(esc, USBPHY_CTRL, reg); in phy_init()
211 PHY_WRITE4(esc, USBPHY_CTRL, reg); in phy_init()
214 PHY_WRITE4(esc, USBPHY_CTRL_SET, reg); in phy_init()
219 device_printf(esc->dev, "Error: failed to get the GPIO dev\n"); in phy_init()
228 PHY_WRITE4(esc, USBPHY_PWD, 0x00); in phy_init()
231 reg = PHY_READ4(esc, USBPHY_DEBUG); in phy_init()
233 PHY_WRITE4(esc, USBPHY_DEBUG, reg); in phy_init()
237 PHY_READ4(esc, USBPHY_CTRL)); in phy_init()
239 PHY_READ4(esc, USBPHY_IP)); in phy_init()
241 PHY_READ4(esc, USBPHY_STATUS)); in phy_init()
243 PHY_READ4(esc, USBPHY_DEBUG)); in phy_init()
245 PHY_READ4(esc, USBPHY_DEBUG0_STATUS)); in phy_init()
247 PHY_READ4(esc, USBPHY_DEBUG1)); in phy_init()
256 struct vybrid_ehci_softc *esc; in vybrid_ehci_attach() local
262 esc = device_get_softc(dev); in vybrid_ehci_attach()
263 esc->dev = dev; in vybrid_ehci_attach()
265 sc = &esc->base; in vybrid_ehci_attach()
271 if (bus_alloc_resources(dev, vybrid_ehci_spec, esc->res)) { in vybrid_ehci_attach()
277 sc->sc_io_tag = rman_get_bustag(esc->res[0]); in vybrid_ehci_attach()
278 bsh = rman_get_bushandle(esc->res[0]); in vybrid_ehci_attach()
279 sc->sc_io_size = rman_get_size(esc->res[0]); in vybrid_ehci_attach()
281 esc->bst_usbc = rman_get_bustag(esc->res[1]); in vybrid_ehci_attach()
282 esc->bsh_usbc = rman_get_bushandle(esc->res[1]); in vybrid_ehci_attach()
284 esc->bst_phy = rman_get_bustag(esc->res[2]); in vybrid_ehci_attach()
285 esc->bsh_phy = rman_get_bushandle(esc->res[2]); in vybrid_ehci_attach()
309 if (phy_init(esc)) { in vybrid_ehci_attach()
324 err = bus_setup_intr(dev, esc->res[3], INTR_TYPE_BIO | INTR_MPSAFE, in vybrid_ehci_attach()
337 err = bus_teardown_intr(dev, esc->res[5], in vybrid_ehci_attach()
368 err = bus_teardown_intr(dev, esc->res[5], in vybrid_ehci_attach()
381 struct vybrid_ehci_softc *esc; in vybrid_ehci_detach() local
385 esc = device_get_softc(dev); in vybrid_ehci_detach()
386 sc = &esc->base; in vybrid_ehci_detach()
408 if (esc->res[5] && sc->sc_intr_hdl) { in vybrid_ehci_detach()
409 err = bus_teardown_intr(dev, esc->res[5], in vybrid_ehci_detach()
421 bus_release_resources(dev, vybrid_ehci_spec, esc->res); in vybrid_ehci_detach()