Lines Matching refs:dev
95 pmc_isa_alloc_resources(device_t dev)
97 struct pmc_isa_softc *sc = device_get_softc(dev);
103 sc->port_res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
113 pmc_isa_release_resources(device_t dev)
115 struct pmc_isa_softc *sc = device_get_softc(dev);
118 bus_release_resource(dev, SYS_RES_IOPORT, 0, sc->port_res);
124 pmc_isa_probe(device_t dev)
126 struct pmc_isa_softc *sc = device_get_softc(dev);
131 if (isa_get_vendorid(dev)) {
134 if (device_get_unit(dev) > 0) {
139 port = isa_get_port(dev);
144 device_printf(dev, "port = 0x%x\n", port);
147 if (bus_set_resource(dev, SYS_RES_IOPORT, 0, port, PMC_ISA_PORTSIZE)) {
149 device_printf(dev, "bus_set_resource failed\n");
153 if (pmc_isa_alloc_resources(dev)) {
155 device_printf(dev, "pmc_isa_alloc_resources failed\n");
167 device_printf(dev, "failed to clear index(0x0052)\n");
170 pmc_isa_release_resources(dev);
178 device_printf(dev, "failed to set index(0x0052)\n");
181 pmc_isa_release_resources(dev);
186 pmc_isa_release_resources(dev);
188 device_set_desc(dev, "Power Management Controller");
193 pmc_isa_attach(device_t dev)
195 struct pmc_isa_softc *sc = device_get_softc(dev);
198 error = pmc_isa_alloc_resources(dev);
200 device_printf(dev, "resource allocation failed\n");
207 sc->flags = device_get_flags(dev);
212 pmc_isa_detach(device_t dev)
214 struct pmc_isa_softc *sc = device_get_softc(dev);
217 device_printf(dev, "pmc_isa_detach called\n");
225 pmc_isa_release_resources(dev);