Lines Matching refs:parport_ip32_dma
488 static struct parport_ip32_dma_data parport_ip32_dma;
501 spin_lock_irqsave(&parport_ip32_dma.lock, flags);
502 if (parport_ip32_dma.left > 0) {
506 volatile u64 __iomem *ctxreg = (parport_ip32_dma.ctx == 0) ?
511 if (parport_ip32_dma.left <= limit) {
512 count = parport_ip32_dma.left;
522 (unsigned int)parport_ip32_dma.buf,
523 (unsigned int)parport_ip32_dma.next,
525 parport_ip32_dma.ctx, ctxval ? "*" : "");
527 ctxval |= parport_ip32_dma.next &
532 parport_ip32_dma.next += count;
533 parport_ip32_dma.left -= count;
534 parport_ip32_dma.ctx ^= 1U;
539 if (parport_ip32_dma.left == 0 && parport_ip32_dma.irq_on) {
543 parport_ip32_dma.irq_on = 0;
545 spin_unlock_irqrestore(&parport_ip32_dma.lock, flags);
555 if (parport_ip32_dma.left)
556 pr_trace(NULL, "(%d): ctx=%d", irq, parport_ip32_dma.ctx);
593 if (!parport_ip32_dma.irq_on) {
597 parport_ip32_dma.irq_on = 1;
601 parport_ip32_dma.dir = dir;
602 parport_ip32_dma.buf = dma_map_single(NULL, addr, count, dir);
603 parport_ip32_dma.len = count;
604 parport_ip32_dma.next = parport_ip32_dma.buf;
605 parport_ip32_dma.left = parport_ip32_dma.len;
606 parport_ip32_dma.ctx = 0;
613 (parport_ip32_dma.next & (MACEPAR_CONTEXT_DATA_BOUND - 1));
641 spin_lock_irq(&parport_ip32_dma.lock);
642 if (parport_ip32_dma.irq_on) {
646 parport_ip32_dma.irq_on = 0;
648 spin_unlock_irq(&parport_ip32_dma.lock);
659 /* Adjust residue (parport_ip32_dma.left) */
676 parport_ip32_dma.left += res[0] + res[1];
684 parport_ip32_dma.irq_on = 1;
686 dma_unmap_single(NULL, parport_ip32_dma.buf, parport_ip32_dma.len,
687 parport_ip32_dma.dir);
697 return parport_ip32_dma.left;
709 spin_lock_init(&parport_ip32_dma.lock);
710 parport_ip32_dma.irq_on = 1;