Lines Matching full:ap
40 #define ADMA_PORT_REGS(ap) \ argument
41 ADMA_REGS((ap)->host->iomap[ADMA_MMIO_BAR], ap->port_no)
117 static int adma_port_start(struct ata_port *ap);
118 static void adma_port_stop(struct ata_port *ap);
122 static void adma_freeze(struct ata_port *ap);
123 static void adma_thaw(struct ata_port *ap);
177 static void adma_reset_engine(struct ata_port *ap) in adma_reset_engine() argument
179 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_reset_engine()
188 static void adma_reinit_engine(struct ata_port *ap) in adma_reinit_engine() argument
190 struct adma_port_priv *pp = ap->private_data; in adma_reinit_engine()
191 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_reinit_engine()
194 writeb(ATA_NIEN, ap->ioaddr.ctl_addr); in adma_reinit_engine()
195 ata_sff_check_status(ap); in adma_reinit_engine()
198 adma_reset_engine(ap); in adma_reinit_engine()
216 static inline void adma_enter_reg_mode(struct ata_port *ap) in adma_enter_reg_mode() argument
218 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_enter_reg_mode()
224 static void adma_freeze(struct ata_port *ap) in adma_freeze() argument
226 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_freeze()
229 writeb(ATA_NIEN, ap->ioaddr.ctl_addr); in adma_freeze()
230 ata_sff_check_status(ap); in adma_freeze()
239 static void adma_thaw(struct ata_port *ap) in adma_thaw() argument
241 adma_reinit_engine(ap); in adma_thaw()
246 struct ata_port *ap = link->ap; in adma_prereset() local
247 struct adma_port_priv *pp = ap->private_data; in adma_prereset()
251 adma_reinit_engine(ap); in adma_prereset()
259 struct ata_port *ap = qc->ap; in adma_fill_sg() local
260 struct adma_port_priv *pp = ap->private_data; in adma_fill_sg()
297 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_prep()
302 adma_enter_reg_mode(qc->ap); in adma_qc_prep()
358 struct ata_port *ap = qc->ap; in adma_packet_start() local
359 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_packet_start()
367 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_issue()
392 struct ata_port *ap = host->ports[port_no]; in adma_intr_pkt() local
395 void __iomem *chan = ADMA_PORT_REGS(ap); in adma_intr_pkt()
401 adma_enter_reg_mode(ap); in adma_intr_pkt()
402 pp = ap->private_data; in adma_intr_pkt()
405 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_pkt()
420 struct ata_eh_info *ehi = &ap->link.eh_info; in adma_intr_pkt()
428 ata_port_abort(ap); in adma_intr_pkt()
430 ata_port_freeze(ap); in adma_intr_pkt()
442 struct ata_port *ap = host->ports[port_no]; in adma_intr_mmio() local
443 struct adma_port_priv *pp = ap->private_data; in adma_intr_mmio()
448 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_mmio()
452 u8 status = ata_sff_check_status(ap); in adma_intr_mmio()
462 struct ata_eh_info *ehi = &ap->link.eh_info; in adma_intr_mmio()
467 ata_port_abort(ap); in adma_intr_mmio()
469 ata_port_freeze(ap); in adma_intr_mmio()
506 static int adma_port_start(struct ata_port *ap) in adma_port_start() argument
508 struct device *dev = ap->host->dev; in adma_port_start()
511 adma_enter_reg_mode(ap); in adma_port_start()
521 ata_port_err(ap, "bad alignment for pp->pkt_dma: %08x\n", in adma_port_start()
525 ap->private_data = pp; in adma_port_start()
526 adma_reinit_engine(ap); in adma_port_start()
530 static void adma_port_stop(struct ata_port *ap) in adma_port_stop() argument
532 adma_reset_engine(ap); in adma_port_stop()
584 struct ata_port *ap = host->ports[port_no]; in adma_ata_init_one() local
588 adma_ata_setup_port(&ap->ioaddr, port_base); in adma_ata_init_one()
590 ata_port_pbar_desc(ap, ADMA_MMIO_BAR, -1, "mmio"); in adma_ata_init_one()
591 ata_port_pbar_desc(ap, ADMA_MMIO_BAR, offset, "port"); in adma_ata_init_one()