[PATCH 5/5] dmaengine: sun6i: Add cyclic capability

Vinod Koul vinod.koul at intel.com
Thu Mar 10 23:32:18 PST 2016


On Thu, Mar 10, 2016 at 11:21:34AM +0100, Jean-Francois Moine wrote:

> +
> +	if (vchan->cyclic && vchan->phy && vchan->phy->desc)
> +		return NULL;

why check for vchan->cyclic? you are setting that at the end!

> @@ -792,6 +903,11 @@ static void sun6i_dma_issue_pending(struct dma_chan *chan)
>  	spin_lock_irqsave(&vchan->vc.lock, flags);
>  
>  	if (vchan_issue_pending(&vchan->vc)) {
> +		if (vchan->phy && vchan->cyclic) {
> +			sun6i_dma_start_desc(vchan);
> +			goto out;
> +		}

Why should this be cyclic specfic, Channel start should be same for all
channels?

> +static int sun6i_dma_alloc_chan_resources(struct dma_chan *chan)
> +{
> +	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
> +
> +	vchan->cyclic = false;

why do you need to set this here?

-- 
~Vinod



More information about the linux-arm-kernel mailing list