[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] DMA



Hi Jim,

Jim Van Vorst wrote:

> Has anyone gotten the OPB DMA controller to work?  I'm just trying to
> DMA between cacheable regions of DDR and it's really flaky.  I've tried
> all kinds of combinations of enabling/disabling/invalidating cache and
> it still either occasionally hangs or results in incorrect data.    It
> does seem to work consistently between non-cacheable regions.  

It should be sufficient to just launch the dma xfer, then dcache
invalidate over the destination region.  An initial dcache flush is not
required since the microblaze caches are write-through.

We've used the opb_dma controller hardware and it seems to work OK, as
you've also found with caches disabled.  The dma controller itself
doesn't know or care about caches, so it looks like your woes are on the
microblaze side.

I saw
> some traffic about using DMA for memcpy.  Did that ever go anywhere?

No.  I wasn't sufficiently convinced of the payoff, when you consider
the DMA setup time, polling (or worse, IRQ) for completion, overhead of
test and branch on checking size parameter, cache issues like you raise
and so on.  Further, most of the peripherals where DMA is desired (e.g.
ethernet) have built in DMA controllers as options.

Not to say it's a bad idea, just dropped off the priority list.  There's
infrastructure in the 2.6 kernel for generic DMA services, it wouldn't
be too hard to plug in a driver for the xps_centraldma to that
framework.   I'm in discussion to do this for a client (for IO, not
memcpy purposes).  If we proceed the results will obviously be pushed
out to the community as well.

Regards,

John



> 
> Thanks,
> Jim
> 
> 
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
> 

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/