Lines Matching refs:fdc
79 fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc) in fdc_isa_alloc_resources() argument
85 fdc->fdc_dev = dev; in fdc_isa_alloc_resources()
88 fdc->resio[i] = NULL; in fdc_isa_alloc_resources()
107 fdc->resio[i + j] = res; in fdc_isa_alloc_resources()
108 fdc->ridio[i + j] = newrid; in fdc_isa_alloc_resources()
109 fdc->ioff[i + j] = j; in fdc_isa_alloc_resources()
110 fdc->ioh[i + j] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
113 if (fdc->resio[2] == NULL) { in fdc_isa_alloc_resources()
117 fdc->iot = rman_get_bustag(fdc->resio[2]); in fdc_isa_alloc_resources()
118 if (fdc->resio[7] == NULL) { in fdc_isa_alloc_resources()
119 port = (rman_get_start(fdc->resio[2]) & ~0x7) + 7; in fdc_isa_alloc_resources()
125 fdc->resio[7] = fdc->resio[2]; in fdc_isa_alloc_resources()
126 fdc->ridio[7] = fdc->ridio[2]; in fdc_isa_alloc_resources()
127 fdc->ioff[7] = fdc->ioff[2] + 5; in fdc_isa_alloc_resources()
128 fdc->ioh[7] = fdc->ioh[2]; in fdc_isa_alloc_resources()
130 fdc->resio[7] = res; in fdc_isa_alloc_resources()
131 fdc->ridio[7] = newrid; in fdc_isa_alloc_resources()
132 fdc->ioff[7] = rman_get_start(res) & 7; in fdc_isa_alloc_resources()
133 fdc->ioh[7] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
137 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fdc->rid_irq, in fdc_isa_alloc_resources()
139 if (fdc->res_irq == NULL) { in fdc_isa_alloc_resources()
144 if ((fdc->flags & FDC_NODMA) == 0) { in fdc_isa_alloc_resources()
145 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, in fdc_isa_alloc_resources()
146 &fdc->rid_drq, RF_ACTIVE | RF_SHAREABLE); in fdc_isa_alloc_resources()
147 if (fdc->res_drq == NULL) { in fdc_isa_alloc_resources()
150 fdc->flags |= FDC_NODMA; in fdc_isa_alloc_resources()
152 fdc->dmachan = rman_get_start(fdc->res_drq); in fdc_isa_alloc_resources()
162 struct fdc_data *fdc; in fdc_isa_probe() local
164 fdc = device_get_softc(dev); in fdc_isa_probe()
165 fdc->fdc_dev = dev; in fdc_isa_probe()
173 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_probe()
175 error = fdc_initial_reset(dev, fdc); in fdc_isa_probe()
177 fdc_release_resources(fdc); in fdc_isa_probe()
184 struct fdc_data *fdc; in fdc_isa_attach() local
187 fdc = device_get_softc(dev); in fdc_isa_attach()
188 fdc->fdc_dev = dev; in fdc_isa_attach()
189 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_attach()
197 fdc_release_resources(fdc); in fdc_isa_attach()
225 DRIVER_MODULE(fdc, isa, fdc_driver, fdc_devclass, 0, 0);