Lines Matching full:dmac
529 struct d350 *dmac; in d350_probe() local
554 dmac = devm_kzalloc(dev, struct_size(dmac, channels, nchan), GFP_KERNEL); in d350_probe()
555 if (!dmac) in d350_probe()
558 dmac->nchan = nchan; in d350_probe()
561 dmac->nreq = FIELD_GET(DMA_CFG_NUM_TRIGGER_IN, reg); in d350_probe()
563 dev_dbg(dev, "DMA-350 r%dp%d with %d channels, %d requests\n", r, p, dmac->nchan, dmac->nreq); in d350_probe()
565 dmac->dma.dev = dev; in d350_probe()
567 dmac->dma.src_addr_widths |= BIT(i); in d350_probe()
568 dmac->dma.dst_addr_widths |= BIT(i); in d350_probe()
570 dmac->dma.directions = BIT(DMA_MEM_TO_MEM); in d350_probe()
571 dmac->dma.descriptor_reuse = true; in d350_probe()
572 dmac->dma.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; in d350_probe()
573 dmac->dma.device_alloc_chan_resources = d350_alloc_chan_resources; in d350_probe()
574 dmac->dma.device_free_chan_resources = d350_free_chan_resources; in d350_probe()
575 dma_cap_set(DMA_MEMCPY, dmac->dma.cap_mask); in d350_probe()
576 dmac->dma.device_prep_dma_memcpy = d350_prep_memcpy; in d350_probe()
577 dmac->dma.device_pause = d350_pause; in d350_probe()
578 dmac->dma.device_resume = d350_resume; in d350_probe()
579 dmac->dma.device_terminate_all = d350_terminate_all; in d350_probe()
580 dmac->dma.device_synchronize = d350_synchronize; in d350_probe()
581 dmac->dma.device_tx_status = d350_tx_status; in d350_probe()
582 dmac->dma.device_issue_pending = d350_issue_pending; in d350_probe()
583 INIT_LIST_HEAD(&dmac->dma.channels); in d350_probe()
588 struct d350_chan *dch = &dmac->channels[i]; in d350_probe()
618 vchan_init(&dch->vc, &dmac->dma); in d350_probe()
622 dma_cap_set(DMA_MEMSET, dmac->dma.cap_mask); in d350_probe()
623 dmac->dma.device_prep_dma_memset = d350_prep_memset; in d350_probe()
626 platform_set_drvdata(pdev, dmac); in d350_probe()
628 ret = dma_async_device_register(&dmac->dma); in d350_probe()
637 struct d350 *dmac = platform_get_drvdata(pdev); in d350_remove() local
639 dma_async_device_unregister(&dmac->dma); in d350_remove()