* DMA from memory to local bus
@ 2008-11-28 6:35 Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-11-29 3:24 ` Robert Hancock
0 siblings, 1 reply; 4+ messages in thread
From: Hommel, Thomas (GE EntSol, Intelligent Platforms) @ 2008-11-28 6:35 UTC (permalink / raw)
To: linux-kernel; +Cc: maciej.sosnowski, dan.j.williams
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?
Thanks for your help
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* DMA from memory to local bus
@ 2008-11-28 14:04 Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-12-01 17:04 ` Ira Snyder
0 siblings, 1 reply; 4+ messages in thread
From: Hommel, Thomas (GE EntSol, Intelligent Platforms) @ 2008-11-28 14:04 UTC (permalink / raw)
To: linuxppc-dev
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.
Thanks for your help
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DMA from memory to local bus
2008-11-28 6:35 DMA from memory to local bus Hommel, Thomas (GE EntSol, Intelligent Platforms)
@ 2008-11-29 3:24 ` Robert Hancock
0 siblings, 0 replies; 4+ messages in thread
From: Robert Hancock @ 2008-11-29 3:24 UTC (permalink / raw)
To: linux-kernel; +Cc: maciej.sosnowski, dan.j.williams
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.
That would be the normal use of these things, I believe.. normally when
copying to/from a device the device does it itself with bus master DMA.
> 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?
>
> Thanks for your help
> Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DMA from memory to local bus
2008-11-28 14:04 Hommel, Thomas (GE EntSol, Intelligent Platforms)
@ 2008-12-01 17:04 ` Ira Snyder
0 siblings, 0 replies; 4+ messages in thread
From: Ira Snyder @ 2008-12-01 17:04 UTC (permalink / raw)
To: Hommel, Thomas (GE EntSol, Intelligent Platforms); +Cc: linuxppc-dev
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-01 17:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 6:35 DMA from memory to local bus Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-11-29 3:24 ` Robert Hancock
-- strict thread matches above, loose matches on Subject: below --
2008-11-28 14:04 Hommel, Thomas (GE EntSol, Intelligent Platforms)
2008-12-01 17:04 ` Ira Snyder
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.