Discussion:
ppc4xx_dma example
(too old to reply)
j***@y2038.com
2006-05-30 23:15:50 UTC
Permalink
Hello,
I'm looking for example code that uses the ppc4xx_dma module. Can
anyone point me in the right direction?

Thanks in advance,
John
Mark Odell
2006-05-31 13:00:13 UTC
Permalink
Post by j***@y2038.com
Hello,
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
j***@y2038.com
2006-05-31 13:16:25 UTC
Permalink
Post by Mark Odell
Post by j***@y2038.com
Hello,
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.
John
Mark Odell
2006-05-31 13:23:23 UTC
Permalink
Post by j***@y2038.com
Post by Mark Odell
Post by j***@y2038.com
Hello,
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
j***@y2038.com
2006-05-31 22:05:06 UTC
Permalink
Post by Mark Odell
Post by j***@y2038.com
Post by Mark Odell
Post by j***@y2038.com
Hello,
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
Agreed, but that's not really what I'm asking. I'm trying to figure out
how to use the *ppc4xx_dma module* as the a general-purpose DMA
interface for a ppc440GX-based board (running Linux) rather than
writing one from scratch (why re-invent the wheel?). I'll be using both
S/G or single-shot DMAs, but an example of how to use the ppc4xx_dma
module with either would be greatly appreciated.
John

Loading...