[PATCH] dmaengine: fsl-edma: fix dmamux index calculating error

Stefan Agner stefan at agner.ch
Wed Jul 2 07:13:04 PDT 2014


Am 2014-07-01 10:41, schrieb Jingchang Lu:
>  	u32 ch = fsl_chan->vchan.chan.chan_id;
> -	void __iomem *muxaddr = fsl_chan->edma->muxbase[ch / DMAMUX_NR];
> +	void __iomem *muxaddr;
>  	unsigned chans_per_mux, ch_off;
>  
>  	chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR;
>  	ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux;
> +	muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux];

After realizing that only one DMA channel was working on Vybrid I first
came up with an almost identically patch before I found this one. I now
applied and tested this one. Without this patch, the DMA user (e.g.
lpuart) fails gracefully and work nonetheless, however without DMA.
Since eDMA support is broken in current state in 3.16-rc3, it would be
good to get this patch into 3.16.

Tested-by: Stefan Agner <stefan at agner.ch>

--
Stefan




More information about the linux-arm-kernel mailing list