@@ -84,7 +84,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
void __iomem *muxaddr;
unsigned int chans_per_mux, ch_off;
- chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR;
+ chans_per_mux = fsl_chan->edma->n_chans / fsl_chan->edma->dmamux_nr;
ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux;
muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux];
slot = EDMAMUX_CHCFG_SOURCE(slot);
@@ -189,6 +189,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
/* Set up version for ColdFire edma */
mcf_edma->version = v2;
+ mcf_edma->dmamux_nr = DMAMUX_NR;
mcf_edma->big_endian = 1;
if (!mcf_edma->n_chans) {