PCI: Update DMA configuration from DT
PCI: Update DMA configuration from DT

If there is a DT node available for the root bridge's parent device, use
the DMA configuration from that device node.  For example, Keystone PCI
devices would require dma_pfn_offset to be set correctly in the device
structure of the PCI device in order to have the correct DMA mask.  The DT
node will have dma-ranges defined for this.  Also support using the DT
property dma-coherent to allow coherent DMA operation by the PCI device.

Use the new helper function of_pci_dma_configure() to update the device DMA
configuration.  This fixes DMA on systems where DMA addresses are a
constant offset from CPU physical addresses.

Tested-by: Suravee Suthikulpanit <ed04488ebbbd0c8ebb072b7ab25add9fa816eb84@amd.com> (AMD Seattle)
Signed-off-by: Murali Karicheri <a2c63438f6716dbcdea754ffda544d5f766e6579@ti.com>
Signed-off-by: Bjorn Helgaas <f10ec01be0c6b54271af5c550cd257810bdf3268@google.com>
Reviewed-by: Catalin Marinas <15ce75b290ebaf27c3f9fd73ab848685ed3d8261@arm.com>
Acked-by: Will Deacon <b913f13ef92ac157955c954ccaaff7be065faba4@arm.com>
CC: Joerg Roedel <4688a6871ff025801033b3c4b039d55a29f8f937@8bytes.org>
CC: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@linaro.org>
CC: Rob Herring <988782c95b9025801edfc9a5b1fd5a8e93699e07@kernel.org>
CC: Russell King <ba324ca7b1c77fc20bb970d5aff6eea9377918a5@arm.linux.org.uk>
CC: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs