Using the loop feature of the DMA controller on MPC8544 DS

Timur Tabi timur at FREESCALE.COM
Thu Mar 13 02:58:21 EST 2008


Sebastian Siewior wrote:
> Hello,
> 
> I have here a MPC8544 DS board and I tried to utilise the dma
> controller. For the transfers I need set the [S|D]AHE bit in the Mode
> Register. This seems to be implemented but is currently unused in the
> driver. 

Which driver?  Zhang's DMA driver?

I haven't looked at Zhang's driver, but I just spotted this code:

case FSL_DMA_IP_85XX:
	new_fsl_chan->toggle_ext_start = fsl_chan_toggle_ext_start;
	new_fsl_chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
case FSL_DMA_IP_83XX:
	new_fsl_chan->set_src_loop_size = fsl_chan_set_src_loop_size;
	new_fsl_chan->set_dest_loop_size = fsl_chan_set_dest_loop_size;

(Don't let the missing "break" from FSL_DMA_IP_85XX fool you)

So it looks like there already is a way to set the SAHE and DAHE bits.  I guess
this is what you mean by "seems to be implemented but is currently unused"?

> I haven't found a way how to set this bit except globally for
> the whole channel.

Well, the SAHE bit is part of the MR register, so it can only apply to a whole
channel.  This is a hardware limitation.

> Is it possible to solve this nicely except dedicating one channel for
> such an operation?

No.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Linuxppc-embedded mailing list