Lines Matching defs:ahc

51 	"ahc",
57 MODULE_DEPEND(ahc_pci, ahc, 1, 1, 1);
77 struct ahc_softc *ahc;
94 ahc = ahc_alloc(dev, name);
95 if (ahc == NULL)
98 ahc_set_unit(ahc, device_get_unit(dev));
105 ahc->flags |= AHC_39BIT_ADDRESSING;
108 error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev),
110 (ahc->flags & AHC_39BIT_ADDRESSING)
119 &ahc->parent_dmat);
124 ahc_free(ahc);
127 ahc->dev_softc = dev;
128 error = ahc_pci_config(ahc, entry);
130 ahc_free(ahc);
134 ahc_attach(ahc);
139 ahc_pci_map_registers(struct ahc_softc *ahc)
151 if (resource_int_value(device_get_name(ahc->dev_softc),
152 device_get_unit(ahc->dev_softc),
155 device_printf(ahc->dev_softc, "Defaulting to MEMIO ");
171 regs = bus_alloc_resource_any(ahc->dev_softc, regs_type,
174 ahc->tag = rman_get_bustag(regs);
175 ahc->bsh = rman_get_bushandle(regs);
181 if (ahc_pci_test_register_access(ahc) != 0) {
182 device_printf(ahc->dev_softc,
185 aic_get_pci_bus(ahc->dev_softc),
186 aic_get_pci_slot(ahc->dev_softc),
187 aic_get_pci_function(ahc->dev_softc));
188 bus_release_resource(ahc->dev_softc, regs_type,
198 regs = bus_alloc_resource_any(ahc->dev_softc, regs_type,
201 ahc->tag = rman_get_bustag(regs);
202 ahc->bsh = rman_get_bushandle(regs);
203 if (ahc_pci_test_register_access(ahc) != 0) {
204 device_printf(ahc->dev_softc,
207 aic_get_pci_bus(ahc->dev_softc),
208 aic_get_pci_slot(ahc->dev_softc),
209 aic_get_pci_function(ahc->dev_softc));
210 bus_release_resource(ahc->dev_softc, regs_type,
217 device_printf(ahc->dev_softc,
221 ahc->platform_data->regs_res_type = regs_type;
222 ahc->platform_data->regs_res_id = regs_id;
223 ahc->platform_data->regs = regs;