Lines Matching refs:ddev
79 return container_of(dmadev, struct hidma_dev, ddev); in to_hidma_dev()
95 INIT_LIST_HEAD(&dmadev->ddev.channels); in hidma_free()
110 struct dma_device *ddev = mchan->chan.device; in hidma_process_completed() local
111 struct hidma_dev *mdma = to_hidma_dev(ddev); in hidma_process_completed()
169 struct dma_device *ddev = mchan->chan.device; in hidma_callback() local
170 struct hidma_dev *dmadev = to_hidma_dev(ddev); in hidma_callback()
189 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_callback()
190 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_callback()
197 struct dma_device *ddev; in hidma_chan_init() local
199 mchan = devm_kzalloc(dmadev->ddev.dev, sizeof(*mchan), GFP_KERNEL); in hidma_chan_init()
203 ddev = &dmadev->ddev; in hidma_chan_init()
206 mchan->chan.device = ddev; in hidma_chan_init()
216 list_add_tail(&mchan->chan.device_node, &ddev->channels); in hidma_chan_init()
217 dmadev->ddev.chancnt++; in hidma_chan_init()
225 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_issue_task()
252 status = pm_runtime_get(dmadev->ddev.dev); in hidma_issue_pending()
319 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_tx_submit()
321 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_tx_submit()
322 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_tx_submit()
325 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_tx_submit()
326 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_tx_submit()
468 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_terminate_channel()
483 dev_err(dmadev->ddev.dev, "channel did not pause\n"); in hidma_terminate_channel()
501 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_terminate_channel()
502 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_terminate_channel()
517 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_terminate_all()
519 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_terminate_all()
520 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_terminate_all()
559 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_pause()
561 dev_warn(dmadev->ddev.dev, "channel did not stop\n"); in hidma_pause()
563 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_pause()
564 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_pause()
578 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_resume()
583 dev_err(dmadev->ddev.dev, in hidma_resume()
585 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_resume()
586 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_resume()
628 device_remove_file(dev->ddev.dev, dev->chid_attrs); in hidma_sysfs_uninit()
637 attrs = devm_kmalloc(dev->ddev.dev, sizeof(struct device_attribute), in hidma_create_sysfs_entry()
642 name_copy = devm_kstrdup(dev->ddev.dev, name, GFP_KERNEL); in hidma_create_sysfs_entry()
660 return device_create_file(dev->ddev.dev, dev->chid_attrs); in hidma_sysfs_init()
680 struct device *dev = dmadev->ddev.dev; in hidma_free_msis()
794 INIT_LIST_HEAD(&dmadev->ddev.channels); in hidma_probe()
796 dmadev->ddev.dev = &pdev->dev; in hidma_probe()
797 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_probe()
799 dma_cap_set(DMA_MEMCPY, dmadev->ddev.cap_mask); in hidma_probe()
800 dma_cap_set(DMA_MEMSET, dmadev->ddev.cap_mask); in hidma_probe()
810 dmadev->ddev.device_prep_dma_memcpy = hidma_prep_dma_memcpy; in hidma_probe()
811 dmadev->ddev.device_prep_dma_memset = hidma_prep_dma_memset; in hidma_probe()
812 dmadev->ddev.device_alloc_chan_resources = hidma_alloc_chan_resources; in hidma_probe()
813 dmadev->ddev.device_free_chan_resources = hidma_free_chan_resources; in hidma_probe()
814 dmadev->ddev.device_tx_status = hidma_tx_status; in hidma_probe()
815 dmadev->ddev.device_issue_pending = hidma_issue_pending; in hidma_probe()
816 dmadev->ddev.device_pause = hidma_pause; in hidma_probe()
817 dmadev->ddev.device_resume = hidma_resume; in hidma_probe()
818 dmadev->ddev.device_terminate_all = hidma_terminate_all; in hidma_probe()
819 dmadev->ddev.copy_align = 8; in hidma_probe()
852 dmadev->lldev = hidma_ll_init(dmadev->ddev.dev, in hidma_probe()
872 INIT_LIST_HEAD(&dmadev->ddev.channels); in hidma_probe()
877 rc = dma_async_device_register(&dmadev->ddev); in hidma_probe()
886 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_probe()
887 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_probe()
908 dev_info(dmadev->ddev.dev, "HI-DMA engine shutdown\n"); in hidma_shutdown()
910 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_shutdown()
912 dev_warn(dmadev->ddev.dev, "channel did not stop\n"); in hidma_shutdown()
913 pm_runtime_mark_last_busy(dmadev->ddev.dev); in hidma_shutdown()
914 pm_runtime_put_autosuspend(dmadev->ddev.dev); in hidma_shutdown()
922 pm_runtime_get_sync(dmadev->ddev.dev); in hidma_remove()
923 dma_async_device_unregister(&dmadev->ddev); in hidma_remove()
925 devm_free_irq(dmadev->ddev.dev, dmadev->irq, dmadev->lldev); in hidma_remove()