Lines Matching refs:parport_ip32_dma
488 static struct parport_ip32_dma_data parport_ip32_dma; variable
501 spin_lock_irqsave(&parport_ip32_dma.lock, flags); in parport_ip32_dma_setup_context()
502 if (parport_ip32_dma.left > 0) { in parport_ip32_dma_setup_context()
506 volatile u64 __iomem *ctxreg = (parport_ip32_dma.ctx == 0) ? in parport_ip32_dma_setup_context()
511 if (parport_ip32_dma.left <= limit) { in parport_ip32_dma_setup_context()
512 count = parport_ip32_dma.left; in parport_ip32_dma_setup_context()
522 (unsigned int)parport_ip32_dma.buf, in parport_ip32_dma_setup_context()
523 (unsigned int)parport_ip32_dma.next, in parport_ip32_dma_setup_context()
525 parport_ip32_dma.ctx, ctxval ? "*" : ""); in parport_ip32_dma_setup_context()
527 ctxval |= parport_ip32_dma.next & in parport_ip32_dma_setup_context()
532 parport_ip32_dma.next += count; in parport_ip32_dma_setup_context()
533 parport_ip32_dma.left -= count; in parport_ip32_dma_setup_context()
534 parport_ip32_dma.ctx ^= 1U; in parport_ip32_dma_setup_context()
539 if (parport_ip32_dma.left == 0 && parport_ip32_dma.irq_on) { in parport_ip32_dma_setup_context()
543 parport_ip32_dma.irq_on = 0; in parport_ip32_dma_setup_context()
545 spin_unlock_irqrestore(&parport_ip32_dma.lock, flags); in parport_ip32_dma_setup_context()
555 if (parport_ip32_dma.left) in parport_ip32_dma_interrupt()
556 pr_trace(NULL, "(%d): ctx=%d", irq, parport_ip32_dma.ctx); in parport_ip32_dma_interrupt()
595 if (!parport_ip32_dma.irq_on) { in parport_ip32_dma_start()
599 parport_ip32_dma.irq_on = 1; in parport_ip32_dma_start()
603 parport_ip32_dma.dir = dir; in parport_ip32_dma_start()
604 parport_ip32_dma.buf = dma_map_single(NULL, addr, count, dir); in parport_ip32_dma_start()
605 parport_ip32_dma.len = count; in parport_ip32_dma_start()
606 parport_ip32_dma.next = parport_ip32_dma.buf; in parport_ip32_dma_start()
607 parport_ip32_dma.left = parport_ip32_dma.len; in parport_ip32_dma_start()
608 parport_ip32_dma.ctx = 0; in parport_ip32_dma_start()
615 (parport_ip32_dma.next & (MACEPAR_CONTEXT_DATA_BOUND - 1)); in parport_ip32_dma_start()
643 spin_lock_irq(&parport_ip32_dma.lock); in parport_ip32_dma_stop()
644 if (parport_ip32_dma.irq_on) { in parport_ip32_dma_stop()
648 parport_ip32_dma.irq_on = 0; in parport_ip32_dma_stop()
650 spin_unlock_irq(&parport_ip32_dma.lock); in parport_ip32_dma_stop()
678 parport_ip32_dma.left += res[0] + res[1]; in parport_ip32_dma_stop()
686 parport_ip32_dma.irq_on = 1; in parport_ip32_dma_stop()
688 dma_unmap_single(NULL, parport_ip32_dma.buf, parport_ip32_dma.len, in parport_ip32_dma_stop()
689 parport_ip32_dma.dir); in parport_ip32_dma_stop()
699 return parport_ip32_dma.left; in parport_ip32_dma_get_residue()
711 spin_lock_init(&parport_ip32_dma.lock); in parport_ip32_dma_register()
712 parport_ip32_dma.irq_on = 1; in parport_ip32_dma_register()