• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/aic7xxx/

Lines Matching defs:ahd

51 	"ahd",
58 DRIVER_MODULE(ahd, pci, ahd_pci_driver, ahd_devclass, 0, 0);
59 MODULE_DEPEND(ahd_pci, ahd, 1, 1, 1);
79 struct ahd_softc *ahd;
96 ahd = ahd_alloc(dev, name);
97 if (ahd == NULL)
100 ahd_set_unit(ahd, device_get_unit(dev));
107 ahd->flags |= AHD_39BIT_ADDRESSING;
110 error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev),
112 (ahd->flags & AHD_39BIT_ADDRESSING)
121 &ahd->parent_dmat);
126 ahd_free(ahd);
129 ahd->dev_softc = dev;
130 error = ahd_pci_config(ahd, entry);
132 ahd_free(ahd);
136 ahd_sysctl(ahd);
137 ahd_attach(ahd);
142 ahd_pci_map_registers(struct ahd_softc *ahd)
157 if (resource_int_value(device_get_name(ahd->dev_softc),
158 device_get_unit(ahd->dev_softc),
161 device_printf(ahd->dev_softc,
166 if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) == 0
171 regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
176 ahd->tags[0] = rman_get_bustag(regs);
177 ahd->bshs[0] = rman_get_bushandle(regs);
178 ahd->tags[1] = ahd->tags[0];
179 error = bus_space_subregion(ahd->tags[0], ahd->bshs[0],
182 &ahd->bshs[1]);
188 || ahd_pci_test_register_access(ahd) != 0) {
189 device_printf(ahd->dev_softc,
192 aic_get_pci_bus(ahd->dev_softc),
193 aic_get_pci_slot(ahd->dev_softc),
194 aic_get_pci_function(ahd->dev_softc));
195 bus_release_resource(ahd->dev_softc, regs_type,
198 AHD_CORRECTABLE_ERROR(ahd);
205 regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
208 device_printf(ahd->dev_softc,
210 AHD_UNCORRECTABLE_ERROR(ahd);
213 ahd->tags[0] = rman_get_bustag(regs);
214 ahd->bshs[0] = rman_get_bushandle(regs);
218 regs2 = bus_alloc_resource_any(ahd->dev_softc, regs_type,
221 device_printf(ahd->dev_softc,
223 AHD_UNCORRECTABLE_ERROR(ahd);
226 ahd->tags[1] = rman_get_bustag(regs2);
227 ahd->bshs[1] = rman_get_bushandle(regs2);
228 ahd->platform_data->regs_res_type[1] = regs_type;
229 ahd->platform_data->regs_res_id[1] = regs_id2;
230 ahd->platform_data->regs[1] = regs2;
232 ahd->platform_data->regs_res_type[0] = regs_type;
233 ahd->platform_data->regs_res_id[0] = regs_id;
234 ahd->platform_data->regs[0] = regs;
239 ahd_pci_map_int(struct ahd_softc *ahd)
244 ahd->platform_data->irq =
245 bus_alloc_resource_any(ahd->dev_softc, SYS_RES_IRQ, &zero,
247 if (ahd->platform_data->irq == NULL)
249 ahd->platform_data->irq_res_type = SYS_RES_IRQ;
250 return (ahd_map_int(ahd));