[RFC PATCH] fsldma: Add DMA_SLAVE support

Li Yang-R58472 LeoLi at freescale.com
Thu Jun 4 21:20:26 EST 2009


>> This is a request for comments on this patch. I hunch it is 
>not quite 
>> ready for inclusion, though it is certainly ready for 
>review. Correct 
>> functioning of this patch depends on the patches submitted earlier.
>> 
>> As suggested by Dan Williams, I implemented DMA_SLAVE 
>support for the 
>> fsldma controller to allow me to use the hardware to 
>transfer to/from 
>> a scatterlist to a list of hardware address/length pairs.
>> 
>> I implemented support for the extra features available in the DMA 
>> controller, such as external pause and external start. I have not 
>> tested the features yet. I am willing to drop the support if 
>> everything else looks good.
>> 
>> I have implemented helper functions for creating the list of 
>hardware 
>> address/length pairs as static inline functions in the 
>linux/fsldma.h 
>> header. Should I incorporate these into the driver itself and use 
>> EXPORT_SYMBOL()? I've never done this before :)
>> 
>
>Any comments on this patch?
>

No comment for now.  Didn't get the time to study the DMA_SLAVE thing.
:(

>I've tested the external start feature, and it works great. I 

Good.  Is it working with your custom board?  Can I verify this with my
reference board?

>had to set the DMA Request Count (in the mode register) after 
>the driver was in control. There is no interface for doing 
>this in the existing driver. I just ioremap()ed the registers 
>and added the value from my driver after claiming the channel 
>with dma_request_channel().
>
>There are ways to get the DMA controller into a state where 
>the CB bit stays set no matter what you do. I have only seen 
>this during an externally controlled transfer, when the 
>external master does weird things. I would fix this state in 
>terminate_all(), but I have been unsuccessful in getting the 
>DMA controller working again after it has been messed up.

What's the frequency for this to happen?  Is the problem reproducable?

- Leo



More information about the Linuxppc-dev mailing list