Lines Matching refs:fdc

77 fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)  in fdc_isa_alloc_resources()  argument
83 fdc->fdc_dev = dev; in fdc_isa_alloc_resources()
86 fdc->resio[i] = NULL; in fdc_isa_alloc_resources()
105 fdc->resio[i + j] = res; in fdc_isa_alloc_resources()
106 fdc->ridio[i + j] = newrid; in fdc_isa_alloc_resources()
107 fdc->ioff[i + j] = j; in fdc_isa_alloc_resources()
108 fdc->ioh[i + j] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
111 if (fdc->resio[2] == NULL) { in fdc_isa_alloc_resources()
115 fdc->iot = rman_get_bustag(fdc->resio[2]); in fdc_isa_alloc_resources()
116 if (fdc->resio[7] == NULL) { in fdc_isa_alloc_resources()
117 port = (rman_get_start(fdc->resio[2]) & ~0x7) + 7; in fdc_isa_alloc_resources()
123 fdc->resio[7] = fdc->resio[2]; in fdc_isa_alloc_resources()
124 fdc->ridio[7] = fdc->ridio[2]; in fdc_isa_alloc_resources()
125 fdc->ioff[7] = fdc->ioff[2] + 5; in fdc_isa_alloc_resources()
126 fdc->ioh[7] = fdc->ioh[2]; in fdc_isa_alloc_resources()
128 fdc->resio[7] = res; in fdc_isa_alloc_resources()
129 fdc->ridio[7] = newrid; in fdc_isa_alloc_resources()
130 fdc->ioff[7] = rman_get_start(res) & 7; in fdc_isa_alloc_resources()
131 fdc->ioh[7] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
135 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fdc->rid_irq, in fdc_isa_alloc_resources()
137 if (fdc->res_irq == NULL) { in fdc_isa_alloc_resources()
142 if ((fdc->flags & FDC_NODMA) == 0) { in fdc_isa_alloc_resources()
143 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, in fdc_isa_alloc_resources()
144 &fdc->rid_drq, RF_ACTIVE | RF_SHAREABLE); in fdc_isa_alloc_resources()
145 if (fdc->res_drq == NULL) { in fdc_isa_alloc_resources()
148 fdc->flags |= FDC_NODMA; in fdc_isa_alloc_resources()
150 fdc->dmachan = rman_get_start(fdc->res_drq); in fdc_isa_alloc_resources()
160 struct fdc_data *fdc; in fdc_isa_probe() local
162 fdc = device_get_softc(dev); in fdc_isa_probe()
163 fdc->fdc_dev = dev; in fdc_isa_probe()
171 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_probe()
173 error = fdc_initial_reset(dev, fdc); in fdc_isa_probe()
175 fdc_release_resources(fdc); in fdc_isa_probe()
182 struct fdc_data *fdc; in fdc_isa_attach() local
185 fdc = device_get_softc(dev); in fdc_isa_attach()
186 fdc->fdc_dev = dev; in fdc_isa_attach()
187 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_attach()
195 fdc_release_resources(fdc); in fdc_isa_attach()
223 DRIVER_MODULE(fdc, isa, fdc_driver, 0, 0);