static int ehci_pci_resume(device_t self) { ehci_softc_t *sc = device_get_softc(self); ehci_pci_takecontroller(self); ehci_power(PWR_RESUME, sc); bus_generic_resume(self); return 0; }
static int ehci_xls_resume(device_t self) { ehci_softc_t *sc = device_get_softc(self); ehci_resume(sc); bus_generic_resume(self); return (0); }
int ata_pci_resume(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); int error = 0; if (ctlr->resume) error = ctlr->resume(dev); bus_generic_resume(dev); return error; }
static int i915_resume(device_t kdev) { struct drm_device *dev = device_get_softc(kdev); DRM_LOCK(); i915_restore_state(dev); DRM_DEBUG("finished resume\n"); DRM_UNLOCK(); return (bus_generic_resume(kdev)); }
static int vgapm_resume(device_t dev) { device_t vga_dev; vga_dev = devclass_get_device(isavga_devclass, 0); if (vga_dev != NULL) vga_resume(vga_dev); return (bus_generic_resume(dev)); }
static int uss820_atmelarm_resume(device_t dev) { struct uss820dci_softc *sc = device_get_softc(dev); int err; uss820dci_resume(sc); err = bus_generic_resume(dev); return (err); }
static int uhci_pci_resume(device_t self) { uhci_softc_t *sc = device_get_softc(self); pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); uhci_resume(sc); bus_generic_resume(self); return (0); }
static int radeon_resume(device_t kdev) { struct drm_device *dev; int ret; dev = device_get_softc(kdev); ret = radeon_resume_kms(dev); if (ret) return (-ret); ret = bus_generic_resume(kdev); return (ret); }
static int isavga_resume(device_t dev) { vga_softc_t *sc; sc = device_get_softc(dev); if (sc->state_buf != NULL) { if (vidd_load_state(sc->adp, sc->state_buf) != 0) device_printf(dev, "failed to reload state\n"); free(sc->state_buf, M_TEMP); sc->state_buf = NULL; } bus_generic_resume(dev); return 0; }
static int isab_resume(device_t dev) { struct isab_softc *sc = device_get_softc(dev); bus_space_tag_t bst; bus_space_handle_t bsh; int i; /* Restore the ELCR if required. */ if (sc->elcr_res != NULL) { bst = rman_get_bustag(sc->elcr_res); bsh = rman_get_bushandle(sc->elcr_res); for (i = 0; i < ELCR_IOLEN; i++) bus_space_write_1(bst, bsh, i, sc->saved_elcr[i]); } return (bus_generic_resume(dev)); }
static int ohci_pci_resume(device_t self) { ohci_softc_t *sc = device_get_softc(self); uint32_t reg, int_line; if (pci_get_powerstate(self) != PCI_POWERSTATE_D0) { device_printf(self, "chip is in D%d mode " "-- setting to D0\n", pci_get_powerstate(self)); reg = pci_read_config(self, PCI_CBMEM, 4); int_line = pci_read_config(self, PCIR_INTLINE, 4); pci_set_powerstate(self, PCI_POWERSTATE_D0); pci_write_config(self, PCI_CBMEM, reg, 4); pci_write_config(self, PCIR_INTLINE, int_line, 4); } ohci_resume(sc); bus_generic_resume(self); return (0); }
static int csa_resume(device_t dev) { csa_res *resp; sc_p scp; scp = device_get_softc(dev); resp = &scp->res; /* Initialize the chip. */ if (csa_initialize(scp)) return (ENXIO); /* Reset the Processor. */ csa_resetdsp(resp); /* Download the Processor Image to the processor. */ if (csa_downloadimage(resp)) return (ENXIO); return (bus_generic_resume(dev)); }
int drm_generic_resume(device_t kdev) { struct drm_device *dev; int error; DRM_DEBUG_KMS("Starting resume\n"); dev = device_get_softc(kdev); if (dev->driver->resume) { error = -dev->driver->resume(dev); if (error) goto out; } error = bus_generic_resume(kdev); out: DRM_DEBUG_KMS("Finished resume: %d\n", error); return error; }
static int i915_resume(device_t kdev) { struct drm_device *dev; int ret; dev = device_get_softc(kdev); DRM_DEBUG_KMS("starting resume\n"); #if 0 if (pci_enable_device(dev->pdev)) return -EIO; pci_set_master(dev->pdev); #endif ret = i915_drm_thaw(dev); if (ret != 0) return (-ret); drm_kms_helper_poll_enable(dev); ret = bus_generic_resume(kdev); DRM_DEBUG_KMS("finished resume %d\n", ret); return (ret); }
static int ohci_pci_resume(device_t self) { ohci_softc_t *sc = device_get_softc(self); #ifndef BURN_BRIDGES uint32_t reg, int_line; if (pci_get_powerstate(self) != PCI_POWERSTATE_D0) { device_printf(self, "chip is in D%d mode " "-- setting to D0\n", pci_get_powerstate(self)); reg = pci_read_config(self, PCI_CBMEM, 4); int_line = pci_read_config(self, PCIR_INTLINE, 4); pci_set_powerstate(self, PCI_POWERSTATE_D0); pci_write_config(self, PCI_CBMEM, reg, 4); pci_write_config(self, PCIR_INTLINE, int_line, 4); } #endif /* !BURN_BRIDGES */ ohci_power(PWR_RESUME, sc); bus_generic_resume(self); return 0; }
int acpi_pci_resume(device_t dev) { int i, numdevs; device_t acpi_dev, child, *devlist; struct pci_devinfo *dinfo; acpi_dev = devclass_get_device(devclass_find("acpi"), 0); device_get_children(dev, &devlist, &numdevs); /* * Set each child to D0 and restore its PCI configuration space. */ for (i = 0; i < numdevs; i++) { /* * Notify ACPI we're going to D0 but ignore the result. If * ACPI is not present, the firmware is responsible for * managing device power. Only manage type 0 devices for now. */ child = devlist[i]; dinfo = (struct pci_devinfo *) device_get_ivars(child); if (acpi_dev && device_is_attached(child) && dinfo->cfg.hdrtype == 0) { ACPI_PWR_FOR_SLEEP(acpi_dev, child, NULL); pci_set_powerstate(child, PCI_POWERSTATE_D0); } /* * Now the device is powered up, restore its config space. */ pci_cfg_restore(child, dinfo); } kfree(devlist, M_TEMP); return (bus_generic_resume(dev)); }
int acpi_pcib_resume(device_t dev) { return (bus_generic_resume(dev)); }
static int gpiobus_resume(device_t dev) { return (bus_generic_resume(dev)); }
static int chipc_resume(device_t dev) { return (bus_generic_resume(dev)); }
static int vga_pci_resume(device_t dev) { return (bus_generic_resume(dev)); }
static int acpi_cst_resume(device_t dev) { acpi_cst_disable_idle = FALSE; return (bus_generic_resume(dev)); }