Lines Matching defs:dev

38 __FBSDID("$FreeBSD: stable/11/sys/dev/rp/rp_isa.c 356020 2019-12-22 19:06:45Z kevans $");
55 #include <dev/rp/rpreg.h>
56 #include <dev/rp/rpvar.h>
131 static int rp_probe(device_t dev);
132 static int rp_attach(device_t dev);
145 rp_probe(device_t dev)
157 if (isa_get_logicalid(dev) != 0)
161 if (bus_get_resource_count(dev, SYS_RES_IOPORT, 0) == 0)
164 unit = device_get_unit(dev);
166 device_printf(dev, "rpprobe: unit number %d invalid.\n", unit);
169 device_printf(dev, "probing for RocketPort(ISA) unit %d.\n", unit);
171 ctlp = device_get_softc(dev);
173 ctlp->dev = dev;
183 device_printf(dev, "rp_attach: Out of memory.\n");
190 device_printf(dev, "rp_attach: Out of memory.\n");
198 ctlp->io[0] = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], 0x40, RF_ACTIVE);
201 ctlp->io[0] = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], 0x44, RF_ACTIVE);
204 device_printf(dev, "rp_attach: Resource not available.\n");
214 device_printf(dev, "board%d init failed.\n", unit);
223 device_set_desc(dev, "RocketPort ISA");
234 rp_attach(device_t dev)
242 unit = device_get_unit(dev);
244 ctlp = device_get_softc(dev);
286 bus_release_resource(ctlp->dev, SYS_RES_IOPORT, ctlp->io_rid[i], ctlp->io[i]);
292 bus_release_resource(rp_controller->dev, SYS_RES_IOPORT, rp_controller->io_rid[ISACTL(ctlp)->MBaseIO], rp_controller->io[ISACTL(ctlp)->MBaseIO]);
387 MudbacCtlP->io[ISACTL(CtlP)->MBaseIO] = bus_alloc_resource(MudbacCtlP->dev, SYS_RES_IOPORT, &CtlP->io_rid[ISACTL(CtlP)->MBaseIO], ctl_base, ctl_base + 3, 4, RF_ACTIVE);
427 CtlP->io[i] = bus_alloc_resource(CtlP->dev, SYS_RES_IOPORT, &CtlP->io_rid[i], aiop_base, aiop_base + aiop_size - 1, aiop_size, RF_ACTIVE);
442 bus_release_resource(CtlP->dev, SYS_RES_IOPORT, CtlP->io_rid[i], CtlP->io[i]);