linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PCI DMA support on the MPC8250
@ 2003-06-24 18:22 Jim Rowe
  0 siblings, 0 replies; 4+ messages in thread
From: Jim Rowe @ 2003-06-24 18:22 UTC (permalink / raw)
  To: linuxppc-embedded


Hello,

I'm working with a custom 8250 board that has a 1394 OHCI chip. OHCI
requires DMA transfers. I didn't see any support in the latest PPC tree
for the DMA features of the 8250's PCI Controller. Is DMA working on the
MPC8250?


--
Jim Rowe
Advanced CounterMeasure Systems
Phone: (916)669-4304
Email: jrowe@acmsystems.com


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* PCI DMA support on the MPC8250
@ 2003-06-25  7:01 Callebaut Benoit
  2003-06-25 13:17 ` Allen Curtis
  0 siblings, 1 reply; 4+ messages in thread
From: Callebaut Benoit @ 2003-06-25  7:01 UTC (permalink / raw)
  To: rowejames; +Cc: linuxppc-embedded


Hello Jim,
I am working on a MPC8245, and I had the same problem. There is no support in
Linux for CPU initiated DMA. The pci_consistent_alloc functions and all others
related to DMA like pci_sync_single have nothing to do with DMA. Their only
job is to keep a block of memory synchronized with the cache or disable the
use of cache with it.
But the DMA transfers are working and are 5 time faster. You must only program
them. It is just 5 registers to configure. You buffers in RAM must be
allocated with consistent_alloc to avoid caching on them and you must always
write physical addresses in the DMA registers( use virt_to_phys).
Note For  PCI addresses virt_to_phys doesn't work well. You must take the
addresses from the "remap" function code. I did it and it works very well.

A good advice : Try to reduce the setup code for the DMA to a maximum.
Otherwise you won't gain anything for small blocks (setup time > memcpy time
).

Or if you Firewire chip support DMA use the DMA ability of your Firewire chip.

Good luck


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI DMA support on the MPC8250
  2003-06-25  7:01 PCI DMA support on the MPC8250 Callebaut Benoit
@ 2003-06-25 13:17 ` Allen Curtis
  0 siblings, 0 replies; 4+ messages in thread
From: Allen Curtis @ 2003-06-25 13:17 UTC (permalink / raw)
  To: Callebaut Benoit, rowejames; +Cc: linuxppc-embedded


>But the DMA transfers are working and are 5 time faster. You must only program
>them. It is just 5 registers to configure. You buffers in RAM must be
>allocated with consistent_alloc to avoid caching on them and you must always
>write physical addresses in the DMA registers( use virt_to_phys).
>Note For  PCI addresses virt_to_phys doesn't work well. You must take the
>addresses from the "remap" function code. I did it and it works very well.

Do you have a patch for you DMA support?


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: PCI DMA support on the MPC8250
@ 2003-06-25 14:24 Callebaut Benoit
  0 siblings, 0 replies; 4+ messages in thread
From: Callebaut Benoit @ 2003-06-25 14:24 UTC (permalink / raw)
  To: Allen Curtis; +Cc: linuxppc-embedded mailing list


>===== Original Message From Allen Curtis <acurtis@onz.com> =====
>>But the DMA transfers are working and are 5 time faster. You must only
program
>>them. It is just 5 registers to configure. You buffers in RAM must be
>>allocated with consistent_alloc to avoid caching on them and you must always
>>write physical addresses in the DMA registers( use virt_to_phys).
>>Note For  PCI addresses virt_to_phys doesn't work well. You must take the
>>addresses from the "remap" function code. I did it and it works very well.
>
>Do you have a patch for you DMA support?

No, but I will make one for the physical address lookup code, the small
changes to support DMA in the kernel (access of EUMBAR base address) and the
snippet of my code that I use in my driver.

It will be against a 2.4.17 Kernel( sorry )

Note : I have A generic DMA driver but it has a big setup time of 25000 cycles
making it interesting (better than memcpy) only for blocks larger than
2KBytes.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-25 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25  7:01 PCI DMA support on the MPC8250 Callebaut Benoit
2003-06-25 13:17 ` Allen Curtis
  -- strict thread matches above, loose matches on Subject: below --
2003-06-25 14:24 Callebaut Benoit
2003-06-24 18:22 Jim Rowe

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).