Re: BayTrail DW DMA: MEMCPY to custom PCI device

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

 



On Tue, 2016-10-25 at 08:43 +0200, Stefan Roese wrote:
> Hi Andy,
> 
> On 24.10.2016 16:12, Andy Shevchenko wrote:
> > On Mon, 2016-10-24 at 15:43 +0200, Stefan Roese wrote:
> > > Hi Andy,

> dmatest works just fine when using it on local memory as source
> and destination.

So, DMA engine works.


> I've also hacked dmatest to use the PCI memory as destination address.

And here is the problem. How memory is addressed? DMA there works with
memory in system address space. Moreover it a) supports only 32-bit DMA
mask, and b) does increment addresses after each burst size. Transfer
width and alignment is calculated automatically from addresses and
lengths parameters (when you call prep_memcpy()). Burst sizes IIRC hard
coded to 16 items. All those at least what you have to think of. If your
PCI memory space requires I/O operation, it will not work I assume.

Basically you need to be sure that your memory is represented in the
system in the same way as system memory (including virtual <-> physical
mapping).

> The test shows that with "noverify=1" no data is written at all to
> this PCI memory. And w/o this parameter, only the data that is
> written "manually" in dmatest_init_dsts() shows up in the PCI
> memory space and dmatest reports the verify errors. So dmatest
> shows the same results as my testing device driver using the DW DMA
> driver to write data into this PCI memory space. Nothing seems to
> be written to this PCI memory space at all.
> 
> May I ask if you are really sure that the DMA controller on Bay
> Trail is able to access data located on the PCI devices other than
> the internal BayTrail PCI devices (like I2C, SPI, HSUART)?

See above.

> Is there some documentation about the DW DMA controller on BayTrail
> and its relationship (hardwired request lines inside the SoC ?)
> other that the "Intel Atom Processor E3800 Product Family Datasheet"?

I'm afraid not publicly available, though I'm not sure.

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux