• Home
  • Raw
  • Download

Lines Matching refs:ap

126 static void sil_freeze(struct ata_port *ap);
127 static void sil_thaw(struct ata_port *ap);
269 struct ata_port *ap = qc->ap; in sil_bmdma_stop() local
270 void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; in sil_bmdma_stop()
271 void __iomem *bmdma2 = mmio_base + sil_port[ap->port_no].bmdma2; in sil_bmdma_stop()
277 ata_sff_dma_pause(ap); in sil_bmdma_stop()
282 struct ata_port *ap = qc->ap; in sil_bmdma_setup() local
283 void __iomem *bmdma = ap->ioaddr.bmdma_addr; in sil_bmdma_setup()
286 iowrite32(ap->bmdma_prd_dma, bmdma + ATA_DMA_TABLE_OFS); in sil_bmdma_setup()
289 ap->ops->sff_exec_command(ap, &qc->tf); in sil_bmdma_setup()
295 struct ata_port *ap = qc->ap; in sil_bmdma_start() local
296 void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; in sil_bmdma_start()
297 void __iomem *bmdma2 = mmio_base + sil_port[ap->port_no].bmdma2; in sil_bmdma_start()
312 struct ata_port *ap = qc->ap; in sil_fill_sg() local
316 prd = &ap->bmdma_prd[0]; in sil_fill_sg()
362 struct ata_port *ap = link->ap; in sil_set_mode() local
363 void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; in sil_set_mode()
364 void __iomem *addr = mmio_base + sil_port[ap->port_no].xfer_mode; in sil_set_mode()
392 static inline void __iomem *sil_scr_addr(struct ata_port *ap, in sil_scr_addr() argument
395 void __iomem *offset = ap->ioaddr.scr_addr; in sil_scr_addr()
414 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_read()
425 void __iomem *mmio = sil_scr_addr(link->ap, sc_reg); in sil_scr_write()
434 static void sil_host_intr(struct ata_port *ap, u32 bmdma2) in sil_host_intr() argument
436 struct ata_eh_info *ehi = &ap->link.eh_info; in sil_host_intr()
437 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->link.active_tag); in sil_host_intr()
447 sil_scr_read(&ap->link, SCR_ERROR, &serror); in sil_host_intr()
448 sil_scr_write(&ap->link, SCR_ERROR, serror); in sil_host_intr()
454 ap->link.eh_info.serror |= serror; in sil_host_intr()
464 ap->ops->sff_check_status(ap); in sil_host_intr()
469 switch (ap->hsm_task_state) { in sil_host_intr()
485 ap->ops->bmdma_stop(qc); in sil_host_intr()
489 ap->hsm_task_state = HSM_ST_ERR; in sil_host_intr()
500 status = ap->ops->sff_check_status(ap); in sil_host_intr()
505 ata_bmdma_irq_clear(ap); in sil_host_intr()
508 ata_sff_hsm_move(ap, qc, status, 0); in sil_host_intr()
518 ata_port_freeze(ap); in sil_host_intr()
531 struct ata_port *ap = host->ports[i]; in sil_interrupt() local
532 u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2); in sil_interrupt()
535 if (ap->flags & SIL_FLAG_NO_SATA_IRQ) in sil_interrupt()
542 sil_host_intr(ap, bmdma2); in sil_interrupt()
551 static void sil_freeze(struct ata_port *ap) in sil_freeze() argument
553 void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; in sil_freeze()
557 writel(0, mmio_base + sil_port[ap->port_no].sien); in sil_freeze()
561 tmp |= SIL_MASK_IDE0_INT << ap->port_no; in sil_freeze()
570 iowrite8(ioread8(ap->ioaddr.bmdma_addr) & ~SIL_DMA_ENABLE, in sil_freeze()
571 ap->ioaddr.bmdma_addr); in sil_freeze()
576 ioread8(ap->ioaddr.bmdma_addr); in sil_freeze()
579 static void sil_thaw(struct ata_port *ap) in sil_thaw() argument
581 void __iomem *mmio_base = ap->host->iomap[SIL_MMIO_BAR]; in sil_thaw()
585 ap->ops->sff_check_status(ap); in sil_thaw()
586 ata_bmdma_irq_clear(ap); in sil_thaw()
589 if (!(ap->flags & SIL_FLAG_NO_SATA_IRQ)) in sil_thaw()
590 writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien); in sil_thaw()
594 tmp &= ~(SIL_MASK_IDE0_INT << ap->port_no); in sil_thaw()
628 struct ata_port *ap = dev->link->ap; in sil_dev_config() local
629 int print_info = ap->link.eh_context.i.flags & ATA_EHI_PRINTINFO; in sil_dev_config()
643 ((ap->flags & SIL_FLAG_MOD15WRITE) && in sil_dev_config()
783 struct ata_port *ap = host->ports[i]; in sil_init_one() local
784 struct ata_ioports *ioaddr = &ap->ioaddr; in sil_init_one()
793 ata_port_pbar_desc(ap, SIL_MMIO_BAR, -1, "mmio"); in sil_init_one()
794 ata_port_pbar_desc(ap, SIL_MMIO_BAR, sil_port[i].tf, "tf"); in sil_init_one()