• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/media/video/

Lines Matching refs:sgdma

393 	struct omap24xxcam_sgdma *sgdma =
401 spin_lock(&sgdma->lock);
404 del_timer(&sgdma->reset_timer);
406 sg_state = sgdma->sg_state + sgslot;
408 spin_unlock(&sgdma->lock);
409 printk(KERN_ERR "%s: sgdma completed when none queued!\n",
425 sgdma->free_sgdma++;
427 spin_unlock(&sgdma->lock);
428 (*callback) (sgdma, sg_csr, arg);
434 spin_unlock(&sgdma->lock);
438 void omap24xxcam_sgdma_process(struct omap24xxcam_sgdma *sgdma)
447 spin_lock_irqsave(&sgdma->lock, flags);
449 queued_sgdma = NUM_SG_DMA - sgdma->free_sgdma;
450 sgslot = (sgdma->next_sgdma + sgdma->free_sgdma) % NUM_SG_DMA;
452 sg_state = sgdma->sg_state + sgslot;
470 if (omap24xxcam_dma_start(&sgdma->dma,
476 spin_unlock_irqrestore(&sgdma->lock, flags);
487 mod_timer(&sgdma->reset_timer, expires);
494 spin_unlock_irqrestore(&sgdma->lock, flags);
502 int omap24xxcam_sgdma_queue(struct omap24xxcam_sgdma *sgdma,
512 spin_lock_irqsave(&sgdma->lock, flags);
514 if (!sgdma->free_sgdma) {
515 spin_unlock_irqrestore(&sgdma->lock, flags);
519 sg_state = sgdma->sg_state + sgdma->next_sgdma;
531 sgdma->next_sgdma = (sgdma->next_sgdma + 1) % NUM_SG_DMA;
532 sgdma->free_sgdma--;
534 spin_unlock_irqrestore(&sgdma->lock, flags);
536 omap24xxcam_sgdma_process(sgdma);
547 void omap24xxcam_sgdma_sync(struct omap24xxcam_sgdma *sgdma)
555 omap24xxcam_dma_stop(&sgdma->dma, csr);
557 spin_lock_irqsave(&sgdma->lock, flags);
559 if (sgdma->free_sgdma < NUM_SG_DMA) {
560 sgslot = (sgdma->next_sgdma + sgdma->free_sgdma) % NUM_SG_DMA;
561 sg_state = sgdma->sg_state + sgslot;
566 sgdma->free_sgdma++;
569 spin_unlock(&sgdma->lock);
570 (*callback) (sgdma, csr, arg);
571 spin_lock(&sgdma->lock);
576 spin_unlock_irqrestore(&sgdma->lock, flags);
579 void omap24xxcam_sgdma_init(struct omap24xxcam_sgdma *sgdma,
586 spin_lock_init(&sgdma->lock);
587 sgdma->free_sgdma = NUM_SG_DMA;
588 sgdma->next_sgdma = 0;
590 sgdma->sg_state[sg].sglen = 0;
591 sgdma->sg_state[sg].next_sglist = 0;
592 sgdma->sg_state[sg].bytes_read = 0;
593 sgdma->sg_state[sg].queued_sglist = 0;
594 sgdma->sg_state[sg].csr = 0;
595 sgdma->sg_state[sg].callback = NULL;
596 sgdma->sg_state[sg].arg = NULL;
599 omap24xxcam_dma_init(&sgdma->dma, base);
600 setup_timer(&sgdma->reset_timer, reset_callback, reset_callback_data);