Lines Matching refs:fdc

76 fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)  in fdc_isa_alloc_resources()  argument
82 fdc->fdc_dev = dev; in fdc_isa_alloc_resources()
85 fdc->resio[i] = NULL; in fdc_isa_alloc_resources()
104 fdc->resio[i + j] = res; in fdc_isa_alloc_resources()
105 fdc->ridio[i + j] = newrid; in fdc_isa_alloc_resources()
106 fdc->ioff[i + j] = j; in fdc_isa_alloc_resources()
107 fdc->ioh[i + j] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
110 if (fdc->resio[2] == NULL) { in fdc_isa_alloc_resources()
114 fdc->iot = rman_get_bustag(fdc->resio[2]); in fdc_isa_alloc_resources()
115 if (fdc->resio[7] == NULL) { in fdc_isa_alloc_resources()
116 port = (rman_get_start(fdc->resio[2]) & ~0x7) + 7; in fdc_isa_alloc_resources()
122 fdc->resio[7] = fdc->resio[2]; in fdc_isa_alloc_resources()
123 fdc->ridio[7] = fdc->ridio[2]; in fdc_isa_alloc_resources()
124 fdc->ioff[7] = fdc->ioff[2] + 5; in fdc_isa_alloc_resources()
125 fdc->ioh[7] = fdc->ioh[2]; in fdc_isa_alloc_resources()
127 fdc->resio[7] = res; in fdc_isa_alloc_resources()
128 fdc->ridio[7] = newrid; in fdc_isa_alloc_resources()
129 fdc->ioff[7] = rman_get_start(res) & 7; in fdc_isa_alloc_resources()
130 fdc->ioh[7] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
134 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fdc->rid_irq, in fdc_isa_alloc_resources()
136 if (fdc->res_irq == NULL) { in fdc_isa_alloc_resources()
141 if ((fdc->flags & FDC_NODMA) == 0) { in fdc_isa_alloc_resources()
142 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, in fdc_isa_alloc_resources()
143 &fdc->rid_drq, RF_ACTIVE | RF_SHAREABLE); in fdc_isa_alloc_resources()
144 if (fdc->res_drq == NULL) { in fdc_isa_alloc_resources()
147 fdc->flags |= FDC_NODMA; in fdc_isa_alloc_resources()
149 fdc->dmachan = rman_get_start(fdc->res_drq); in fdc_isa_alloc_resources()
159 struct fdc_data *fdc; in fdc_isa_probe() local
161 fdc = device_get_softc(dev); in fdc_isa_probe()
162 fdc->fdc_dev = dev; in fdc_isa_probe()
170 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_probe()
172 error = fdc_initial_reset(dev, fdc); in fdc_isa_probe()
174 fdc_release_resources(fdc); in fdc_isa_probe()
181 struct fdc_data *fdc; in fdc_isa_attach() local
184 fdc = device_get_softc(dev); in fdc_isa_attach()
185 fdc->fdc_dev = dev; in fdc_isa_attach()
186 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_attach()
194 fdc_release_resources(fdc); in fdc_isa_attach()
222 DRIVER_MODULE(fdc, isa, fdc_driver, 0, 0);