ppc4xx_dma example - Powerpc

This is a discussion on ppc4xx_dma example - Powerpc ; 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...

+ Reply to Thread
Results 1 to 5 of 5

Thread: ppc4xx_dma example

  1. 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


  2. Re: ppc4xx_dma example

    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


  3. Re: ppc4xx_dma example


    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.
    John


  4. Re: ppc4xx_dma example


    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


  5. Re: ppc4xx_dma example


    Mark Odell wrote:
    > 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


+ Reply to Thread