linux/drivers/pci/endpoint
Kishon Vijay Abraham I b330104fa7 PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
After commit 7232888366 ("of: restrict DMA configuration"),
of_dma_configure() doesn't configure the coherent_dma_mask/dma_mask
of endpoint function device (since it doesn't have a DT node associated
with and hence no dma-ranges property), resulting in
dma_alloc_coherent() (used in pci_epf_alloc_space()) to fail.

Fix it by making dma_alloc_coherent() use EPC's device for allocating
memory address.

Link: http://lkml.kernel.org/r/64d63468-d28f-8fcd-a6f3-cf2a6401c8cb@ti.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[lorenzo.pieralisi@arm.com: tweaked commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Tested-by: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
Tested-by: Niklas Cassel <niklas.cassel@axis.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
2018-01-11 10:06:34 +00:00
..
functions PCI: endpoint: Use correct "end of test" interrupt 2017-09-20 13:56:06 -05:00
Kconfig PCI: endpoint: Make PCI_ENDPOINT depend on HAS_DMA 2017-05-22 16:23:59 -05:00
Makefile PCI: endpoint: functions: Add an EP function to test PCI 2017-04-11 14:18:37 -05:00
pci-ep-cfs.c PCI: endpoint: Fix find_first_zero_bit() usage 2017-12-19 11:05:44 +00:00
pci-epc-core.c PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent() 2018-01-11 10:06:34 +00:00
pci-epc-mem.c PCI: endpoint: Add support for configurable page size 2017-08-29 16:00:37 -05:00
pci-epf-core.c PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent() 2018-01-11 10:06:34 +00:00