LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Question about DMA
@ 2008-01-27 20:51 Francis Moreau
2008-01-27 22:34 ` Jiri Slaby
0 siblings, 1 reply; 9+ messages in thread
From: Francis Moreau @ 2008-01-27 20:51 UTC (permalink / raw)
To: linux-kernel
Hello,
I have 2 questions regarding set_dma_addr(unsigned int channel,
unsigned int addr) helper.
1/ Why does the function take only one address ? I would expect it
to take both a source and a destination address for the dma controller
to transfer data.
2/ The type of address parameter is an unsigned int. Why isn't it a dma_addr_t
type ?
Thanks !
--
Francis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-27 20:51 Question about DMA Francis Moreau
@ 2008-01-27 22:34 ` Jiri Slaby
2008-01-28 8:55 ` Francis Moreau
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2008-01-27 22:34 UTC (permalink / raw)
To: Francis Moreau; +Cc: linux-kernel
On 01/27/2008 09:51 PM, Francis Moreau wrote:
> Hello,
>
> I have 2 questions regarding set_dma_addr(unsigned int channel,
> unsigned int addr) helper.
>
> 1/ Why does the function take only one address ? I would expect it
> to take both a source and a destination address for the dma controller
> to transfer data.
since your device is responsible for sending data from/to local memory. ISA dma
controller has only 2 registers -- 16-bit address to put incoming data to (get
outcoming from) + 8-bit nonincrementing page and 16-bit counter.
> 2/ The type of address parameter is an unsigned int. Why isn't it a dma_addr_t
> type ?
since isa dma controller can address up to 2^24 (16-bit address + 8-bit page)
bytes of memory, i.e. 16M.
Are you sure, you want use this API?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-27 22:34 ` Jiri Slaby
@ 2008-01-28 8:55 ` Francis Moreau
2008-01-28 9:04 ` Jiri Slaby
2008-01-28 9:21 ` Haavard Skinnemoen
0 siblings, 2 replies; 9+ messages in thread
From: Francis Moreau @ 2008-01-28 8:55 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-kernel
Hello Jiri,
On Jan 27, 2008 11:34 PM, Jiri Slaby <jirislaby@gmail.com> wrote:
> On 01/27/2008 09:51 PM, Francis Moreau wrote:
> > 1/ Why does the function take only one address ? I would expect it
> > to take both a source and a destination address for the dma controller
> > to transfer data.
>
> since your device is responsible for sending data from/to local memory. ISA dma
> controller has only 2 registers -- 16-bit address to put incoming data to (get
> outcoming from) + 8-bit nonincrementing page and 16-bit counter.
>
> > 2/ The type of address parameter is an unsigned int. Why isn't it a dma_addr_t
> > type ?
>
> since isa dma controller can address up to 2^24 (16-bit address + 8-bit page)
> bytes of memory, i.e. 16M.
>
> Are you sure, you want use this API?
>
>
No ;)
My DMA controller has very little in common with ISA DMA one. But I'd like to
use it in a driver. This driver can do DMA but with the help of an external DMA
controller. It's only implement the "slave" side. So basically this driver needs
to configure one of the DMAC channels before transfering data.
What other API could I use in this case ? I don't think the DMA-mapping can
help in this case...
Thanks
--
Francis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-28 8:55 ` Francis Moreau
@ 2008-01-28 9:04 ` Jiri Slaby
2008-01-28 10:20 ` Francis Moreau
2008-01-28 9:21 ` Haavard Skinnemoen
1 sibling, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2008-01-28 9:04 UTC (permalink / raw)
To: Francis Moreau; +Cc: linux-kernel
On 01/28/2008 09:55 AM, Francis Moreau wrote:
> No ;)
Heh :)
> My DMA controller has very little in common with ISA DMA one. But I'd like to
> use it in a driver. This driver can do DMA but with the help of an external DMA
> controller. It's only implement the "slave" side. So basically this driver needs
> to configure one of the DMAC channels before transfering data.
Which bus is it in this case?
> What other API could I use in this case ? I don't think the DMA-mapping can
> help in this case...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-28 8:55 ` Francis Moreau
2008-01-28 9:04 ` Jiri Slaby
@ 2008-01-28 9:21 ` Haavard Skinnemoen
2008-01-28 10:22 ` Francis Moreau
1 sibling, 1 reply; 9+ messages in thread
From: Haavard Skinnemoen @ 2008-01-28 9:21 UTC (permalink / raw)
To: Francis Moreau; +Cc: Jiri Slaby, linux-kernel
On Mon, 28 Jan 2008 09:55:58 +0100
"Francis Moreau" <francis.moro@gmail.com> wrote:
> My DMA controller has very little in common with ISA DMA one. But I'd like to
> use it in a driver. This driver can do DMA but with the help of an external DMA
> controller. It's only implement the "slave" side. So basically this driver needs
> to configure one of the DMAC channels before transfering data.
Have a look at this thread:
http://lkml.org/lkml/2007/11/23/79
I'm planning to post an updated patch set this week that addresses the
comments by Dan Williams, and that applies on top of the other DMA
Engine patches that have been posted since then.
Please let me know if you think this will work for your hardware. What
platform are you working on, btw?
Haavard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-28 9:21 ` Haavard Skinnemoen
@ 2008-01-28 10:22 ` Francis Moreau
2008-01-28 10:29 ` Haavard Skinnemoen
0 siblings, 1 reply; 9+ messages in thread
From: Francis Moreau @ 2008-01-28 10:22 UTC (permalink / raw)
To: Haavard Skinnemoen; +Cc: Jiri Slaby, linux-kernel
Hello Haavard,
On Jan 28, 2008 10:21 AM, Haavard Skinnemoen <hskinnemoen@atmel.com> wrote:
> On Mon, 28 Jan 2008 09:55:58 +0100
> "Francis Moreau" <francis.moro@gmail.com> wrote:
>
> > My DMA controller has very little in common with ISA DMA one. But I'd like to
> > use it in a driver. This driver can do DMA but with the help of an external DMA
> > controller. It's only implement the "slave" side. So basically this driver needs
> > to configure one of the DMAC channels before transfering data.
>
> Have a look at this thread:
>
> http://lkml.org/lkml/2007/11/23/79
>
> I'm planning to post an updated patch set this week that addresses the
> comments by Dan Williams, and that applies on top of the other DMA
> Engine patches that have been posted since then.
>
> Please let me know if you think this will work for your hardware.
Thanks for pointing this out. I currently can't look at this but I'll
try to give it
a deep look this week.
> What platform are you working on, btw?
>
SH
Thanks.
--
Francis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-28 10:22 ` Francis Moreau
@ 2008-01-28 10:29 ` Haavard Skinnemoen
2008-01-28 10:40 ` Francis Moreau
0 siblings, 1 reply; 9+ messages in thread
From: Haavard Skinnemoen @ 2008-01-28 10:29 UTC (permalink / raw)
To: Francis Moreau; +Cc: Jiri Slaby, linux-kernel
On Mon, 28 Jan 2008 11:22:49 +0100
"Francis Moreau" <francis.moro@gmail.com> wrote:
> > Please let me know if you think this will work for your hardware.
>
> Thanks for pointing this out. I currently can't look at this but I'll
> try to give it
> a deep look this week.
Great. I'll Cc you on the next round of patches.
> > What platform are you working on, btw?
> >
>
> SH
Nice. That means we have potential users on three different
architectures (the other two being avr32 and arm; I wouldn't be too
surprised if powerpc and mips want a piece of the fun at some point
too.)
Haavard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about DMA
2008-01-28 10:29 ` Haavard Skinnemoen
@ 2008-01-28 10:40 ` Francis Moreau
0 siblings, 0 replies; 9+ messages in thread
From: Francis Moreau @ 2008-01-28 10:40 UTC (permalink / raw)
To: Haavard Skinnemoen; +Cc: Jiri Slaby, linux-kernel, Paul Mundt
[ Added Paul in CC ]
On Jan 28, 2008 11:29 AM, Haavard Skinnemoen <hskinnemoen@atmel.com> wrote:
> On Mon, 28 Jan 2008 11:22:49 +0100
> "Francis Moreau" <francis.moro@gmail.com> wrote:
>
> > > Please let me know if you think this will work for your hardware.
> >
> > Thanks for pointing this out. I currently can't look at this but I'll
> > try to give it
> > a deep look this week.
>
> Great. I'll Cc you on the next round of patches.
>
> > > What platform are you working on, btw?
> > >
> >
> > SH
>
> Nice. That means we have potential users on three different
> architectures (the other two being avr32 and arm; I wouldn't be too
> surprised if powerpc and mips want a piece of the fun at some point
> too.)
>
I think it's worth to CC Paul as well. He plans to move SH architecture to
use the dmaengine API soon, and he's definitively the right person who
can give you some useful feedbacks from SH architecture.
--
Francis
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-28 10:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-27 20:51 Question about DMA Francis Moreau
2008-01-27 22:34 ` Jiri Slaby
2008-01-28 8:55 ` Francis Moreau
2008-01-28 9:04 ` Jiri Slaby
2008-01-28 10:20 ` Francis Moreau
2008-01-28 9:21 ` Haavard Skinnemoen
2008-01-28 10:22 ` Francis Moreau
2008-01-28 10:29 ` Haavard Skinnemoen
2008-01-28 10:40 ` Francis Moreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).