Re: BayTrail DW DMA: MEMCPY to custom PCI device

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

 



Hi Andy,

On 24.10.2016 15:14, Andy Shevchenko wrote:
> On Mon, 2016-10-24 at 14:34 +0200, Stefan Roese wrote:
>> Hi!
>>
>> I'm currently trying to xfer data from system memory to a PCI
>> device (FPGA) via DMA MEMCPY on a BayTrail based platform similar
>> to the MinnowboardMax. For this I thought that I could use the
>> integrated Synopsis DW DMA controller(s). My first tests show
>> that the memory behind the PCI device is not updated with the
>> DMA data though (no error message from the DMA driver though).
>> I'm wondering now, if those 2 DMA controllers can be used for
>> such generic PCI transfers. Or if they can only be used to
>> transfer to the I2C / SPI / UART devices instead.
>>
>> Any infos / links on this would be very helpful.
> 
> You can do memory-to-memory transfers,

Good.

> but not device-to-memory or
> memory-to-device except mentioned ones because they are using request
> lines wired inside SoC.
> 
> Be careful BayTrail and Braswell has auto power gating for DMA and you
> _have_to_ be sure that it's powered on before doing any access to it,
> otherwise the bus and therefore OS will hang. It means any of the (ACPI)
>  device using those DMA shall be part of LPSS power domain. More
> information is available in drivers/acpi_lpss.c. 
>
> For PCI devices I have no idea how you can power DMA on except explicit
> call of power_set_power_state() on certain struct pci_dev which you get
> by BDF for the system.

Thanks for the information.

The DMA controller is powered and generates an interrupt:

[   30.308167] dw_dmac_pci 0000:00:1e.0: dw_dma_interrupt: status=0x1
[   30.308179] dw_dmac_pci 0000:00:1e.0: dw_dma_tasklet: status_err=0

Still no data transferred to the PCI memory space (FPGA). The
parameters passed to dwc_prep_dma_memcpy() seem to okay at first
glance. I'll debug a bit to see, if I find a problem here.

One related question:
Do you know if and how the memory-to-memory transfer has been tested
lately on such x86 platforms?

Thanks,
Stefan
--
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