All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ira Snyder <iws@ovro.caltech.edu>
To: "Hommel, Thomas (GE EntSol,
	Intelligent Platforms)" <Thomas.Hommel@gefanuc.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: DMA from memory to local bus
Date: Mon, 1 Dec 2008 09:04:55 -0800	[thread overview]
Message-ID: <20081201170455.GB32299@ovro.caltech.edu> (raw)
In-Reply-To: <62DDBB9E5E23CC4A929EE46F9427CEAF01654DD8@BUDMLVEM04.e2k.ad.ge.com>

On Fri, Nov 28, 2008 at 03:04:04PM +0100, Hommel, Thomas (GE EntSol, Intelligent Platforms) wrote:
> 
> Hi all,
> I'm currently developing a driver and want to make use of the DMA
> offload engine. Data has to be transferred from memory to a device on
> the local bus and vice versa.
> At a first look, the function dma_async_memcpy_buf_to_buf() seemed to be
> suitable, but it does not translate addresses correctly. Both addresses
> are treated as if they were in memory.
> In my configuration, the buffer is located in memory, but the device's
> I/O space is mapped into vmalloc space via ioremap(). How can I access
> the I/O space corectly from the DMA controller? I also checked the
> return of virt_to_phys() and this does not deliver the correct physical
> address.
> The board is based on MPC8641D and I'm using the on-chip DMA engine.
> 

Check out my PCINet driver, posted here previously. It does something
similar.

It uses the PowerPC DMA controller to transfer all of the data around.
You probably need to use dma_map_single() to get the physical address of
your memory to give it to the DMA controller.

Ira

  reply	other threads:[~2008-12-01 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 14:04 DMA from memory to local bus Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-12-01 17:04 ` Ira Snyder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-28  6:35 Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-11-29  3:24 ` Robert Hancock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081201170455.GB32299@ovro.caltech.edu \
    --to=iws@ovro.caltech.edu \
    --cc=Thomas.Hommel@gefanuc.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.