Re: Help me!



On Feb 28, 8:45 pm, "Michael N. Moran" <mnmo...@xxxxxxxxxxxxx> wrote:
huxuelei...@xxxxxxxxx wrote:
Hi, I have been developing a driver for plx9656
device.Now I want to use DMA to tranfser data from Local
Address to PCI Address.But I always got wrong result.

You're not giving us much to work with. For example, what
is this "wrong result?"

There is a bit more to doing a DMA transfer than just
setting up the DMA registers.

o Does the transfer complete (without errors?) according
to the register interface?
o Are you expecting/receiving an interrupt?
o If the register interface indicates completion,
is the expected data incorrect?

Working with PCI can be ... interesting, and there are many
details that need to be correct. On top of that, processors
that operate with PCI buses can add a few layers of fun
themselves (e.g. interrupt controllers, virtual addresses
and caches.)

If you want help, you need to give details.

--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
Kennesaw, GA, USA 30144    http://mnmoran.org

"So often times it happens, that we live our lives in chains
 and we never even know we have the key."
"Already Gone" by Jack Tempchin (recorded by The Eagles)

The Beatles were wrong: 1 & 1 & 1 is 1

Oh, I am sorry.I did not say that clearly.

My driver can transfer data, and I can handle these data after I
received a DMA DONE interrupt.The data in the FIFO are like these:
0x00000001, 0x00000002, 0x00000003,...0x0001000.
In every FIFO interrupt , I should tranfser these data from FIFO to
another address.I can transfer correctly when I use memory copy.But
after I start the DMA, these transfered data would be like these:
0x00000001, 0x00040001, 0x0000001, 0x00040001,......
.



Relevant Pages

  • Re: DMA APIs gumble grumble
    ... 32-bit mask should that fail. ... 32-bit SAC addressing is done more efficiently than DAC addressing. ... DAC interfaces to the PCI DMA API for when "you really really want DAC ...
    (Linux-Kernel)
  • Re: direct memory access
    ... No, 1 ISA, 5 PCI and 1 AGP. ... PCI and AGP might be shared. ... >>> If you don't see the Advanced tab, either your hardware doesn't>> support DMA or the DMA settings are incorrect in the BIOS. ... [[With some IDE drivers/Busmastering drivers, DMA cannot be>> enabled through the device manager, but only through the driver>> settings. ...
    (microsoft.public.windowsxp.help_and_support)
  • [PATCH] docs: move DMA-mapping.txt to Documentation/PCI/
    ... -addresses (DMA addresses) into physical addresses. ... This is needed so that e.g. PCI devices can ... -So that Linux can use the dynamic DMA mapping, it needs some help from the ... And at least one platform (SGI ...
    (Linux-Kernel)
  • [PATCH 1/3 for mainline] docs: Move DMA-mapping.txt to Documentation/PCI/
    ... -addresses (DMA addresses) into physical addresses. ... This is needed so that e.g. PCI devices can ... -So that Linux can use the dynamic DMA mapping, it needs some help from the ... And at least one platform (SGI ...
    (Linux-Kernel)
  • [PATCH 1/4] Documentation: move DMA-mapping.txt to Doc/PCI/
    ... -addresses (DMA addresses) into physical addresses. ... This is needed so that e.g. PCI devices can ... -So that Linux can use the dynamic DMA mapping, it needs some help from the ... And at least one platform (SGI ...
    (Linux-Kernel)