Post by j***@y2038.comPost by Mark OdellPost by j***@y2038.comHello,
I'm looking for example code that uses the ppc4xx_dma module. Can
anyone point me in the right direction?
Do you have a specific question? Are you using the 405 or 440 series?
They differ enough to matter. The PPC Linux sources have DMA code but
it's not exactly a HOW-TO of DMA. The AMCC user manuals for the 405 and
440 are pretty good - I wrote my working drivers from them so it can't
be too hard.
--
- Mark
I'm using the 440 series. I'm just looking for something that shows
how to use the existing ppc4xx_dma module in Linux the way it's
intended to be used rather than starting at the register level
directly.
Oh, so you are using Linux. Do you intend to do scatter/gather or
"single-shot" DMA transfers? For S/G you need to provide a list of
physical pages whereas the single-shot mode you supply a single
physically contiguous buffer.
The concept of DMA on the 440 are simple. Set up the channel, e.g.
periph-to-mem, 4 byte periph. width, buffer enable, dest addr
(physical), chip timing for periph., burst size, and interrupt enables.
Then tell the driver to set up the S/G list or program the DMA
registers to "arm" the DMA. When the peripheral requests the DMA the
process will start. For mem-to-periph it's pretty similar, just the
other way.
--
- Mark