Lines Matching refs:zdev

218 	struct zynqmp_dma_device *zdev;  member
863 devm_free_irq(chan->zdev->dev, chan->irq, chan); in zynqmp_dma_chan_remove()
875 static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev, in zynqmp_dma_chan_probe() argument
883 chan = devm_kzalloc(zdev->dev, sizeof(*chan), GFP_KERNEL); in zynqmp_dma_chan_probe()
886 chan->dev = zdev->dev; in zynqmp_dma_chan_probe()
887 chan->zdev = zdev; in zynqmp_dma_chan_probe()
905 dev_err(zdev->dev, "invalid bus-width value"); in zynqmp_dma_chan_probe()
910 zdev->chan = chan; in zynqmp_dma_chan_probe()
919 chan->common.device = &zdev->common; in zynqmp_dma_chan_probe()
920 list_add_tail(&chan->common.device_node, &zdev->common.channels); in zynqmp_dma_chan_probe()
946 struct zynqmp_dma_device *zdev = ofdma->of_dma_data; in of_zynqmp_dma_xlate() local
948 return dma_get_slave_channel(&zdev->chan->common); in of_zynqmp_dma_xlate()
990 struct zynqmp_dma_device *zdev = dev_get_drvdata(dev); in zynqmp_dma_runtime_suspend() local
992 clk_disable_unprepare(zdev->clk_main); in zynqmp_dma_runtime_suspend()
993 clk_disable_unprepare(zdev->clk_apb); in zynqmp_dma_runtime_suspend()
1007 struct zynqmp_dma_device *zdev = dev_get_drvdata(dev); in zynqmp_dma_runtime_resume() local
1010 err = clk_prepare_enable(zdev->clk_main); in zynqmp_dma_runtime_resume()
1016 err = clk_prepare_enable(zdev->clk_apb); in zynqmp_dma_runtime_resume()
1019 clk_disable_unprepare(zdev->clk_main); in zynqmp_dma_runtime_resume()
1040 struct zynqmp_dma_device *zdev; in zynqmp_dma_probe() local
1044 zdev = devm_kzalloc(&pdev->dev, sizeof(*zdev), GFP_KERNEL); in zynqmp_dma_probe()
1045 if (!zdev) in zynqmp_dma_probe()
1048 zdev->dev = &pdev->dev; in zynqmp_dma_probe()
1049 INIT_LIST_HEAD(&zdev->common.channels); in zynqmp_dma_probe()
1052 dma_cap_set(DMA_MEMCPY, zdev->common.cap_mask); in zynqmp_dma_probe()
1054 p = &zdev->common; in zynqmp_dma_probe()
1064 zdev->clk_main = devm_clk_get(&pdev->dev, "clk_main"); in zynqmp_dma_probe()
1065 if (IS_ERR(zdev->clk_main)) { in zynqmp_dma_probe()
1067 return PTR_ERR(zdev->clk_main); in zynqmp_dma_probe()
1070 zdev->clk_apb = devm_clk_get(&pdev->dev, "clk_apb"); in zynqmp_dma_probe()
1071 if (IS_ERR(zdev->clk_apb)) { in zynqmp_dma_probe()
1073 return PTR_ERR(zdev->clk_apb); in zynqmp_dma_probe()
1076 platform_set_drvdata(pdev, zdev); in zynqmp_dma_probe()
1077 pm_runtime_set_autosuspend_delay(zdev->dev, ZDMA_PM_TIMEOUT); in zynqmp_dma_probe()
1078 pm_runtime_use_autosuspend(zdev->dev); in zynqmp_dma_probe()
1079 pm_runtime_enable(zdev->dev); in zynqmp_dma_probe()
1080 pm_runtime_get_sync(zdev->dev); in zynqmp_dma_probe()
1081 if (!pm_runtime_enabled(zdev->dev)) { in zynqmp_dma_probe()
1082 ret = zynqmp_dma_runtime_resume(zdev->dev); in zynqmp_dma_probe()
1087 ret = zynqmp_dma_chan_probe(zdev, pdev); in zynqmp_dma_probe()
1093 p->dst_addr_widths = BIT(zdev->chan->bus_width / 8); in zynqmp_dma_probe()
1094 p->src_addr_widths = BIT(zdev->chan->bus_width / 8); in zynqmp_dma_probe()
1096 dma_async_device_register(&zdev->common); in zynqmp_dma_probe()
1099 of_zynqmp_dma_xlate, zdev); in zynqmp_dma_probe()
1102 dma_async_device_unregister(&zdev->common); in zynqmp_dma_probe()
1106 pm_runtime_mark_last_busy(zdev->dev); in zynqmp_dma_probe()
1107 pm_runtime_put_sync_autosuspend(zdev->dev); in zynqmp_dma_probe()
1114 zynqmp_dma_chan_remove(zdev->chan); in zynqmp_dma_probe()
1116 if (!pm_runtime_enabled(zdev->dev)) in zynqmp_dma_probe()
1117 zynqmp_dma_runtime_suspend(zdev->dev); in zynqmp_dma_probe()
1118 pm_runtime_disable(zdev->dev); in zynqmp_dma_probe()
1130 struct zynqmp_dma_device *zdev = platform_get_drvdata(pdev); in zynqmp_dma_remove() local
1133 dma_async_device_unregister(&zdev->common); in zynqmp_dma_remove()
1135 zynqmp_dma_chan_remove(zdev->chan); in zynqmp_dma_remove()
1136 pm_runtime_disable(zdev->dev); in zynqmp_dma_remove()
1137 if (!pm_runtime_enabled(zdev->dev)) in zynqmp_dma_remove()
1138 zynqmp_dma_runtime_suspend(zdev->dev); in zynqmp_dma_remove()