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/[email protected]
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
[[email protected]: tweaked commit log]
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Tested-by: Cyrille Pitchen <[email protected]>
Tested-by: Niklas Cassel <[email protected]>
Reviewed-by: Robin Murphy <[email protected]>