Lines Matching refs:ap

103 static u32 hpt3x2n_find_mode(struct ata_port *ap, int speed)  in hpt3x2n_find_mode()  argument
139 static int hpt3x2n_cable_detect(struct ata_port *ap) in hpt3x2n_cable_detect() argument
142 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt3x2n_cable_detect()
154 if (ata66 & (2 >> ap->port_no)) in hpt3x2n_cable_detect()
171 struct ata_port *ap = link->ap; in hpt3x2n_pre_reset() local
172 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt3x2n_pre_reset()
175 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); in hpt3x2n_pre_reset()
181 static void hpt3x2n_set_mode(struct ata_port *ap, struct ata_device *adev, in hpt3x2n_set_mode() argument
184 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt3x2n_set_mode()
189 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no); in hpt3x2n_set_mode()
190 addr2 = 0x51 + 4 * ap->port_no; in hpt3x2n_set_mode()
205 timing = hpt3x2n_find_mode(ap, mode); in hpt3x2n_set_mode()
220 static void hpt3x2n_set_piomode(struct ata_port *ap, struct ata_device *adev) in hpt3x2n_set_piomode() argument
222 hpt3x2n_set_mode(ap, adev, adev->pio_mode); in hpt3x2n_set_piomode()
233 static void hpt3x2n_set_dmamode(struct ata_port *ap, struct ata_device *adev) in hpt3x2n_set_dmamode() argument
235 hpt3x2n_set_mode(ap, adev, adev->dma_mode); in hpt3x2n_set_dmamode()
247 struct ata_port *ap = qc->ap; in hpt3x2n_bmdma_stop() local
248 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt3x2n_bmdma_stop()
249 int mscreg = 0x50 + 2 * ap->port_no; in hpt3x2n_bmdma_stop()
254 if (bwsr_stat & (1 << ap->port_no)) in hpt3x2n_bmdma_stop()
275 static void hpt3x2n_set_clock(struct ata_port *ap, int source) in hpt3x2n_set_clock() argument
277 void __iomem *bmdma = ap->ioaddr.bmdma_addr - ap->port_no * 8; in hpt3x2n_set_clock()
299 static int hpt3x2n_use_dpll(struct ata_port *ap, int writing) in hpt3x2n_use_dpll() argument
301 long flags = (long)ap->host->private_data; in hpt3x2n_use_dpll()
313 struct ata_port *ap = qc->ap; in hpt3x2n_qc_defer() local
314 struct ata_port *alt = ap->host->ports[ap->port_no ^ 1]; in hpt3x2n_qc_defer()
315 int rc, flags = (long)ap->host->private_data; in hpt3x2n_qc_defer()
316 int dpll = hpt3x2n_use_dpll(ap, qc->tf.flags & ATA_TFLAG_WRITE); in hpt3x2n_qc_defer()
330 struct ata_port *ap = qc->ap; in hpt3x2n_qc_issue() local
331 int flags = (long)ap->host->private_data; in hpt3x2n_qc_issue()
332 int dpll = hpt3x2n_use_dpll(ap, qc->tf.flags & ATA_TFLAG_WRITE); in hpt3x2n_qc_issue()
337 ap->host->private_data = (void *)(long)flags; in hpt3x2n_qc_issue()
339 hpt3x2n_set_clock(ap, dpll ? 0x21 : 0x23); in hpt3x2n_qc_issue()