Still no good luck for me.
I cannot use "dma_map_single".
I put it into my code, it can compile, but, when i "insmod" , it have a notice
"unresolved symbol virt_to_dma" called by dma_map_single.
I search for virt_to_dma and i found that it is at
{linuxpath}/asm/memory.h:
#ifndef __arch_page_to_dma
#define page_to_dma(dev, page)
((dma_addr_t)__virt_to_bus(page_address(page)))
#define dma_to_virt(dev, addr) (__bus_to_virt(addr))
#define virt_to_dma(dev, addr) (__virt_to_bus(addr))
#else
#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page))
#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr))
#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr))
#endif
I thought It seem like i see virt_to_bus that i use before and it doesn't work.
Anyway,i try to include "/asm/memory" to see result of using.It still show that
"unresolved symbol virt_to_dma" when i insmod my module.
--- In "pakorn_0608" <> wrote:
>
> I just come back on today, back to fight with DMA again.
>
> Firstly, your advice book, I found that there is this book at the library of
> my office. I used to borrow it many for a few month ago when i coding char
> device driver for linux on ts-7400. I'll borrow it again.
>
> Next, for ma_map_single api, i'll check it.
>
> Time to solve again.
>
> Thanks a lot,BMS.
>
> Pakorn
>
>
>
> --- In "Breton M. Saunders" <breton.saunders@> wrote:
> >
> > pakorn_0608 wrote:
> > > Thanks so much,BMS.
> > > It's very kind of you.
> > >
> > > I'm finding another source of knowledge for solve this problem.
> > > For "flush_dcache_page" included in "loop.c", It's good guildline for me.
> > > I'll see and learn from it.
> > >
> > > If any progress,i'll come to share again.
> > >
> > > BTW, I have to go to province on the evening and come back on monday,
> > > It's hardly to play the net.
> > > If any message from you,i may have chance to reply on monday.
> > >
> > > Thanks in advance.
> > >
> > >
> > Gosh - its been a long time since I've done this stuff.
> >
> > Its coming back slowly.
> >
> > First thing: check this reference:
> > http://www.xml.com/ldd/chapter/book/ch13.html
> > You might just want to buy a copy actually. I found it indispensable
> > when doing driver development.
> >
> > Second, look at:
> > http://lxr.free-electrons.com/source/Documentation/DMA-API.txt
> > In particular, section Id on streaming maps. I believe you can just use
> > the dma_map_single api calls to correctly handle the cache coherency
> > needed for the M2M.
> >
> > Good luck.
> >
> > -bms
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|