|
|
|
|
|
|
| Author |
Message |
jlange@y2038.com *nix forums beginner
Joined: 30 May 2006
Posts: 3
|
Posted: Tue May 30, 2006 11:15 pm Post subject:
ppc4xx_dma example
|
|
|
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 |
|
| Back to top |
|
 |
Mark Odell *nix forums beginner
Joined: 16 Mar 2005
Posts: 40
|
Posted: Wed May 31, 2006 1:00 pm Post subject:
Re: ppc4xx_dma example
|
|
|
jlange@y2038.com wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
jlange@y2038.com *nix forums beginner
Joined: 30 May 2006
Posts: 3
|
Posted: Wed May 31, 2006 1:16 pm Post subject:
Re: ppc4xx_dma example
|
|
|
Mark Odell wrote:
| Quote: | jlange@y2038.com wrote:
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 |
|
| Back to top |
|
 |
Mark Odell *nix forums beginner
Joined: 16 Mar 2005
Posts: 40
|
Posted: Wed May 31, 2006 1:23 pm Post subject:
Re: ppc4xx_dma example
|
|
|
jla...@y2038.com wrote:
| Quote: | Mark Odell wrote:
jlange@y2038.com wrote:
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 |
|
| Back to top |
|
 |
jlange@y2038.com *nix forums beginner
Joined: 30 May 2006
Posts: 3
|
Posted: Wed May 31, 2006 10:05 pm Post subject:
Re: ppc4xx_dma example
|
|
|
Mark Odell wrote:
| Quote: | jla...@y2038.com wrote:
Mark Odell wrote:
jlange@y2038.com wrote:
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 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Wed Dec 03, 2008 8:04 pm | All times are GMT
|
|
Online Advertising | Mobile Phones | Mortgage Calculator | Credit Cards | Online Advertising
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|