Lines Matching refs:ctlr

72     struct ata_pci_controller *ctlr = device_get_softc(dev);
176 if (!(ctlr->chip = ata_match_chip(dev, ids)))
179 if ((ctlr->chip->cfg1 & NVAHCI) &&
184 ctlr->chipinit = ata_nvidia_chipinit;
191 struct ata_pci_controller *ctlr = device_get_softc(dev);
196 if (ctlr->chip->cfg1 & NVAHCI) {
197 ctlr->ch_attach = ata_nvidia_ch_attach_dumb;
198 ctlr->setmode = ata_sata_setmode;
199 } else if (ctlr->chip->max_dma >= ATA_SA150) {
201 ctlr->r_type2 = SYS_RES_IOPORT;
203 ctlr->r_type2 = SYS_RES_MEMORY;
204 ctlr->r_rid2 = PCIR_BAR(5);
205 if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
206 &ctlr->r_rid2, RF_ACTIVE))) {
207 int offset = ctlr->chip->cfg1 & NV4 ? 0x0440 : 0x0010;
209 ctlr->ch_attach = ata_nvidia_ch_attach;
210 ctlr->ch_detach = ata_pci_ch_detach;
211 ctlr->reset = ata_nvidia_reset;
217 if (ctlr->chip->cfg1 & NVQ) {
219 ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);
222 ATA_OUTL(ctlr->r_res2, offset + 4, 0x000d000d);
225 ATA_OUTL(ctlr->r_res2, 0x0400,
226 ATA_INL(ctlr->r_res2, 0x0400) & 0xfffffff9);
230 ATA_OUTB(ctlr->r_res2, offset, 0xff);
233 ATA_OUTB(ctlr->r_res2, offset + 1, 0xdd);
236 ctlr->setmode = ata_sata_setmode;
237 ctlr->getrev = ata_sata_getrev;
242 ctlr->setmode = ata_nvidia_setmode;
250 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
257 ch->r_io[ATA_SSTATUS].res = ctlr->r_res2;
259 ch->r_io[ATA_SERROR].res = ctlr->r_res2;
261 ch->r_io[ATA_SCONTROL].res = ctlr->r_res2;
284 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
286 int offset = ctlr->chip->cfg1 & NV4 ? 0x0440 : 0x0010;
287 int shift = ch->unit << (ctlr->chip->cfg1 & NVQ ? 4 : 2);
291 if (ctlr->chip->cfg1 & NVQ)
292 istatus = ATA_INL(ctlr->r_res2, offset);
294 istatus = ATA_INB(ctlr->r_res2, offset);
301 if (ctlr->chip->cfg1 & NVQ)
302 ATA_OUTL(ctlr->r_res2, offset, (0x0f << shift) | 0x00f000f0);
304 ATA_OUTB(ctlr->r_res2, offset, (0x0f << shift));
325 struct ata_pci_controller *ctlr = device_get_softc(parent);
335 mode = min(mode, ctlr->chip->max_dma);