Lines Matching refs:ctlr

89     struct ata_pci_controller *ctlr = device_get_softc(dev);
132 if (!(ctlr->chip = ata_find_chip(dev, ids, -99)))
136 if (!(ctlr->chip = ata_match_chip(dev, new_ids)))
141 ctlr->chipinit = ata_via_chipinit;
148 struct ata_pci_controller *ctlr = device_get_softc(dev);
154 if (ctlr->chip->cfg2 & VIASATA) {
155 ctlr->ch_attach = ata_via_sata_ch_attach;
156 ctlr->setmode = ata_via_sata_setmode;
157 ctlr->getrev = ata_via_sata_getrev;
158 ctlr->reset = ata_via_sata_reset;
162 if (ctlr->chip->max_dma >= ATA_SA150) {
163 ctlr->r_type2 = SYS_RES_IOPORT;
164 ctlr->r_rid2 = PCIR_BAR(5);
165 if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
166 &ctlr->r_rid2, RF_ACTIVE))) {
167 ctlr->ch_attach = ata_via_ch_attach;
168 ctlr->ch_detach = ata_via_ch_detach;
169 ctlr->reset = ata_via_reset;
171 if (ctlr->chip->cfg2 & VIABAR) {
172 ctlr->channels = 3;
173 ctlr->setmode = ata_via_new_setmode;
175 ctlr->setmode = ata_sata_setmode;
176 ctlr->getrev = ata_sata_getrev;
181 if (ctlr->chip->cfg2 & VIACLK)
185 if (ctlr->chip->cfg2 & VIABUG)
203 ctlr->setmode = ata_via_old_setmode;
210 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
214 if (ctlr->chip->cfg2 & VIABAR) {
235 ch->r_io[i].res = ctlr->r_res1;
248 ch->r_io[ATA_SSTATUS].res = ctlr->r_res2;
249 ch->r_io[ATA_SSTATUS].offset = (ch->unit << ctlr->chip->cfg1);
250 ch->r_io[ATA_SERROR].res = ctlr->r_res2;
251 ch->r_io[ATA_SERROR].offset = 0x04 + (ch->unit << ctlr->chip->cfg1);
252 ch->r_io[ATA_SCONTROL].res = ctlr->r_res2;
253 ch->r_io[ATA_SCONTROL].offset = 0x08 + (ch->unit << ctlr->chip->cfg1);
267 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
271 if (ctlr->chip->cfg2 & VIABAR) {
292 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
295 if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1))
317 struct ata_pci_controller *ctlr = device_get_softc(parent);
320 if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) {
346 struct ata_pci_controller *ctlr = device_get_softc(parent);
359 mode = min(mode, ctlr->chip->max_dma);
363 modes[ctlr->chip->cfg1][mode & ATA_MODE_MASK], 1);