Lines Matching refs:fdc

80 fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)  in fdc_isa_alloc_resources()  argument
86 fdc->fdc_dev = dev; in fdc_isa_alloc_resources()
89 fdc->resio[i] = NULL; in fdc_isa_alloc_resources()
108 fdc->resio[i + j] = res; in fdc_isa_alloc_resources()
109 fdc->ridio[i + j] = newrid; in fdc_isa_alloc_resources()
110 fdc->ioff[i + j] = j; in fdc_isa_alloc_resources()
111 fdc->ioh[i + j] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
114 if (fdc->resio[2] == NULL) { in fdc_isa_alloc_resources()
118 fdc->iot = rman_get_bustag(fdc->resio[2]); in fdc_isa_alloc_resources()
119 if (fdc->resio[7] == NULL) { in fdc_isa_alloc_resources()
120 port = (rman_get_start(fdc->resio[2]) & ~0x7) + 7; in fdc_isa_alloc_resources()
126 fdc->resio[7] = fdc->resio[2]; in fdc_isa_alloc_resources()
127 fdc->ridio[7] = fdc->ridio[2]; in fdc_isa_alloc_resources()
128 fdc->ioff[7] = fdc->ioff[2] + 5; in fdc_isa_alloc_resources()
129 fdc->ioh[7] = fdc->ioh[2]; in fdc_isa_alloc_resources()
131 fdc->resio[7] = res; in fdc_isa_alloc_resources()
132 fdc->ridio[7] = newrid; in fdc_isa_alloc_resources()
133 fdc->ioff[7] = rman_get_start(res) & 7; in fdc_isa_alloc_resources()
134 fdc->ioh[7] = rman_get_bushandle(res); in fdc_isa_alloc_resources()
138 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fdc->rid_irq, in fdc_isa_alloc_resources()
140 if (fdc->res_irq == NULL) { in fdc_isa_alloc_resources()
145 if ((fdc->flags & FDC_NODMA) == 0) { in fdc_isa_alloc_resources()
146 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, in fdc_isa_alloc_resources()
147 &fdc->rid_drq, RF_ACTIVE | RF_SHAREABLE); in fdc_isa_alloc_resources()
148 if (fdc->res_drq == NULL) { in fdc_isa_alloc_resources()
151 fdc->flags |= FDC_NODMA; in fdc_isa_alloc_resources()
153 fdc->dmachan = rman_get_start(fdc->res_drq); in fdc_isa_alloc_resources()
163 struct fdc_data *fdc; in fdc_isa_probe() local
165 fdc = device_get_softc(dev); in fdc_isa_probe()
166 fdc->fdc_dev = dev; in fdc_isa_probe()
174 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_probe()
176 error = fdc_initial_reset(dev, fdc); in fdc_isa_probe()
178 fdc_release_resources(fdc); in fdc_isa_probe()
185 struct fdc_data *fdc; in fdc_isa_attach() local
188 fdc = device_get_softc(dev); in fdc_isa_attach()
189 fdc->fdc_dev = dev; in fdc_isa_attach()
190 error = fdc_isa_alloc_resources(dev, fdc); in fdc_isa_attach()
198 fdc_release_resources(fdc); in fdc_isa_attach()
226 DRIVER_MODULE(fdc, isa, fdc_driver, fdc_devclass, 0, 0);