static int ps3_ohci_remove(struct ps3_system_bus_device *dev) { unsigned int tmp; struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev); BUG_ON(!hcd); dev_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs); dev_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq); tmp = hcd->irq; ohci_shutdown(hcd); usb_remove_hcd(hcd); ps3_system_bus_set_drvdata(dev, NULL); BUG_ON(!hcd->regs); iounmap(hcd->regs); release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_put_hcd(hcd); ps3_io_irq_destroy(tmp); ps3_free_mmio_region(dev->m_region); ps3_dma_region_free(dev->d_region); ps3_close_hv_device(dev); return 0; }
static int ohci_pci_detach(device_t self, int flags) { struct ohci_pci_softc *sc = device_private(self); int rv; rv = ohci_detach(&sc->sc, flags); if (rv) return rv; pmf_device_deregister(self); ohci_shutdown(self, flags); if (sc->sc.sc_size) { /* Disable interrupts, so we don't get any spurious ones. */ bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS); } if (sc->sc_ih != NULL) { pci_intr_disestablish(sc->sc_pc, sc->sc_ih); sc->sc_ih = NULL; } if (sc->sc.sc_size) { bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); sc->sc.sc_size = 0; } #if NEHCI > 0 usb_pci_rem(&sc->sc_pci); #endif return 0; }
static void omap_ohci_shutdown(struct usb_hcd *hcd) { dev_dbg(hcd->self.controller, "%s %lu\n", __func__, jiffies); clk_enable(clk_get(NULL, "usbtll_fck")); clk_enable(clk_get(NULL, "usbhost_120m_fck")); clk_enable(clk_get(NULL, "usbhost_48m_fck")); ohci_shutdown(hcd); }
static void omap_ohci_shutdown(struct usb_hcd *hcd) { struct ohci_omap_clock_defs *ohci_clocks; ohci_clocks = (struct ohci_omap_clock_defs *) (((char *)hcd_to_ohci(hcd)) + sizeof(struct ohci_hcd)); if (ohci_clocks->suspended) { clk_enable(ohci_clocks->usbhost_ick_clk); clk_enable(ohci_clocks->usbtll_ick_clk); clk_enable(ohci_clocks->usbtll_fck_clk); clk_enable(ohci_clocks->usbhost1_48m_fck_clk); clk_enable(ohci_clocks->usbhost2_120m_fck_clk); ohci_clocks->suspended = 0; } ohci_shutdown(hcd); }
static void ohci_brcm_shutdown(struct usb_hcd *hcd) { if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) ohci_shutdown(hcd); }