Re: [PATCH v4 10/15] dmaengine: ti: New driver for K3 UDMA - split#2: probe/remove, xlate and filter_fn

From: Vinod Koul
Date: Mon Nov 11 2019 - 00:33:11 EST


On 01-11-19, 10:41, Peter Ujfalusi wrote:

> +static bool udma_dma_filter_fn(struct dma_chan *chan, void *param)
> +{
> + struct psil_endpoint_config *ep_config;
> + struct udma_chan *uc;
> + struct udma_dev *ud;
> + u32 *args;
> +
> + if (chan->device->dev->driver != &udma_driver.driver)
> + return false;
> +
> + uc = to_udma_chan(chan);
> + ud = uc->ud;
> + args = param;
> + uc->remote_thread_id = args[0];
> +
> + if (uc->remote_thread_id & K3_PSIL_DST_THREAD_ID_OFFSET)
> + uc->dir = DMA_MEM_TO_DEV;
> + else
> + uc->dir = DMA_DEV_TO_MEM;

Can you explain this a bit?

> +static int udma_remove(struct platform_device *pdev)
> +{
> + struct udma_dev *ud = platform_get_drvdata(pdev);
> +
> + of_dma_controller_free(pdev->dev.of_node);
> + dma_async_device_unregister(&ud->ddev);
> +
> + /* Make sure that we did proper cleanup */
> + cancel_work_sync(&ud->purge_work);
> + udma_purge_desc_work(&ud->purge_work);

kill the vchan tasklets at it too please
--
~Vinod