diff options
Diffstat (limited to 'sys/pc98/cbus/fdc.c')
-rw-r--r-- | sys/pc98/cbus/fdc.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index c3a4dde..72680f3 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -925,8 +925,8 @@ fdc_alloc_resources(struct fdc_data *fdc) #ifdef PC98 rid = 3; bus_set_resource(dev, SYS_RES_IOPORT, rid, IO_FDPORT, 1); - fdc->res_fdsio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, - 1, RF_ACTIVE); + fdc->res_fdsio = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE); if (fdc->res_fdsio == 0) return ENXIO; fdc->sc_fdsiot = rman_get_bustag(fdc->res_fdsio); @@ -934,8 +934,8 @@ fdc_alloc_resources(struct fdc_data *fdc) rid = 4; bus_set_resource(dev, SYS_RES_IOPORT, rid, 0x4be, 1); - fdc->res_fdemsio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, - 1, RF_ACTIVE); + fdc->res_fdemsio = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE); if (fdc->res_fdemsio == 0) return ENXIO; fdc->sc_fdemsiot = rman_get_bustag(fdc->res_fdemsio); @@ -980,9 +980,8 @@ fdc_alloc_resources(struct fdc_data *fdc) * Now (finally!) allocate the control port. */ fdc->rid_ctl = 1; - fdc->res_ctl = bus_alloc_resource(dev, SYS_RES_IOPORT, - &fdc->rid_ctl, - 0ul, ~0ul, 1, RF_ACTIVE); + fdc->res_ctl = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &fdc->rid_ctl, RF_ACTIVE); if (fdc->res_ctl == 0) { device_printf(dev, "cannot reserve control I/O port range (control port)\n"); @@ -993,18 +992,16 @@ fdc_alloc_resources(struct fdc_data *fdc) } #endif - fdc->res_irq = bus_alloc_resource(dev, SYS_RES_IRQ, - &fdc->rid_irq, 0ul, ~0ul, 1, - RF_ACTIVE); + fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &fdc->rid_irq, RF_ACTIVE); if (fdc->res_irq == 0) { device_printf(dev, "cannot reserve interrupt line\n"); return ENXIO; } if ((fdc->flags & FDC_NODMA) == 0) { - fdc->res_drq = bus_alloc_resource(dev, SYS_RES_DRQ, - &fdc->rid_drq, 0ul, ~0ul, 1, - RF_ACTIVE); + fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, + &fdc->rid_drq, RF_ACTIVE); if (fdc->res_drq == 0) { device_printf(dev, "cannot reserve DMA request line\n"); return ENXIO; |