Lines Matching refs:ap
210 static u32 hpt37x_find_mode(struct ata_port *ap, int speed) in hpt37x_find_mode() argument
212 struct hpt_clock *clocks = ap->host->private_data; in hpt37x_find_mode()
334 static int hpt37x_cable_detect(struct ata_port *ap) in hpt37x_cable_detect() argument
336 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt37x_cable_detect()
349 if (ata66 & (2 >> ap->port_no)) in hpt37x_cable_detect()
362 static int hpt374_fn1_cable_detect(struct ata_port *ap) in hpt374_fn1_cable_detect() argument
364 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt374_fn1_cable_detect()
365 unsigned int mcrbase = 0x50 + 4 * ap->port_no; in hpt374_fn1_cable_detect()
377 if (ata66 & (2 >> ap->port_no)) in hpt374_fn1_cable_detect()
393 struct ata_port *ap = link->ap; in hpt37x_pre_reset() local
394 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt37x_pre_reset()
400 if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) in hpt37x_pre_reset()
404 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); in hpt37x_pre_reset()
410 static void hpt370_set_mode(struct ata_port *ap, struct ata_device *adev, in hpt370_set_mode() argument
413 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt370_set_mode()
418 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no); in hpt370_set_mode()
419 addr2 = 0x51 + 4 * ap->port_no; in hpt370_set_mode()
435 timing = hpt37x_find_mode(ap, mode); in hpt370_set_mode()
449 static void hpt370_set_piomode(struct ata_port *ap, struct ata_device *adev) in hpt370_set_piomode() argument
451 hpt370_set_mode(ap, adev, adev->pio_mode); in hpt370_set_piomode()
462 static void hpt370_set_dmamode(struct ata_port *ap, struct ata_device *adev) in hpt370_set_dmamode() argument
464 hpt370_set_mode(ap, adev, adev->dma_mode); in hpt370_set_dmamode()
476 struct ata_port *ap = qc->ap; in hpt370_bmdma_stop() local
477 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt370_bmdma_stop()
478 void __iomem *bmdma = ap->ioaddr.bmdma_addr; in hpt370_bmdma_stop()
488 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); in hpt370_bmdma_stop()
498 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); in hpt370_bmdma_stop()
504 static void hpt372_set_mode(struct ata_port *ap, struct ata_device *adev, in hpt372_set_mode() argument
507 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt372_set_mode()
512 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no); in hpt372_set_mode()
513 addr2 = 0x51 + 4 * ap->port_no; in hpt372_set_mode()
528 timing = hpt37x_find_mode(ap, mode); in hpt372_set_mode()
543 static void hpt372_set_piomode(struct ata_port *ap, struct ata_device *adev) in hpt372_set_piomode() argument
545 hpt372_set_mode(ap, adev, adev->pio_mode); in hpt372_set_piomode()
556 static void hpt372_set_dmamode(struct ata_port *ap, struct ata_device *adev) in hpt372_set_dmamode() argument
558 hpt372_set_mode(ap, adev, adev->dma_mode); in hpt372_set_dmamode()
570 struct ata_port *ap = qc->ap; in hpt37x_bmdma_stop() local
571 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in hpt37x_bmdma_stop()
572 int mscreg = 0x50 + 4 * ap->port_no; in hpt37x_bmdma_stop()
577 if (bwsr_stat & (1 << ap->port_no)) in hpt37x_bmdma_stop()