Lines Matching refs:ddev
79 struct dma_device ddev; member
107 return container_of(d, struct mtk_uart_apdmadev, ddev); in to_mtk_uart_apdma_dev()
277 ret = pm_runtime_resume_and_get(mtkd->ddev.dev); in mtk_uart_apdma_alloc_chan_resources()
305 pm_runtime_put_noidle(mtkd->ddev.dev); in mtk_uart_apdma_alloc_chan_resources()
320 pm_runtime_put_sync(mtkd->ddev.dev); in mtk_uart_apdma_free_chan_resources()
462 while (!list_empty(&mtkd->ddev.channels)) { in mtk_uart_apdma_free()
463 struct mtk_chan *c = list_first_entry(&mtkd->ddev.channels, in mtk_uart_apdma_free()
506 dma_cap_set(DMA_SLAVE, mtkd->ddev.cap_mask); in mtk_uart_apdma_probe()
507 mtkd->ddev.device_alloc_chan_resources = in mtk_uart_apdma_probe()
509 mtkd->ddev.device_free_chan_resources = in mtk_uart_apdma_probe()
511 mtkd->ddev.device_tx_status = mtk_uart_apdma_tx_status; in mtk_uart_apdma_probe()
512 mtkd->ddev.device_issue_pending = mtk_uart_apdma_issue_pending; in mtk_uart_apdma_probe()
513 mtkd->ddev.device_prep_slave_sg = mtk_uart_apdma_prep_slave_sg; in mtk_uart_apdma_probe()
514 mtkd->ddev.device_config = mtk_uart_apdma_slave_config; in mtk_uart_apdma_probe()
515 mtkd->ddev.device_pause = mtk_uart_apdma_device_pause; in mtk_uart_apdma_probe()
516 mtkd->ddev.device_terminate_all = mtk_uart_apdma_terminate_all; in mtk_uart_apdma_probe()
517 mtkd->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE); in mtk_uart_apdma_probe()
518 mtkd->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE); in mtk_uart_apdma_probe()
519 mtkd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); in mtk_uart_apdma_probe()
520 mtkd->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; in mtk_uart_apdma_probe()
521 mtkd->ddev.dev = &pdev->dev; in mtk_uart_apdma_probe()
522 INIT_LIST_HEAD(&mtkd->ddev.channels); in mtk_uart_apdma_probe()
532 c = devm_kzalloc(mtkd->ddev.dev, sizeof(*c), GFP_KERNEL); in mtk_uart_apdma_probe()
544 vchan_init(&c->vc, &mtkd->ddev); in mtk_uart_apdma_probe()
555 rc = dma_async_device_register(&mtkd->ddev); in mtk_uart_apdma_probe()
569 dma_async_device_unregister(&mtkd->ddev); in mtk_uart_apdma_probe()
585 dma_async_device_unregister(&mtkd->ddev); in mtk_uart_apdma_remove()