mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
of: iommu: Add ptr to OF node arg to of_iommu_configure()
of_iommu_configure() is called from of_dma_configure() to setup iommu ops using DT property. This API is currently used for platform devices for which DMA configuration (including IOMMU ops) may come from the device's parent. To extend this functionality for PCI devices, this API needs to take a parent node ptr as an argument instead of assuming device's parent. This is needed since for PCI, the DMA configuration may be defined in the DT node of the root bus bridge's parent device. Currently only dma-range is used for PCI and IOMMU is not supported. Return error if the device is PCI. Add "parent" parameter (a struct device_node *) to of_iommu_configure(). Tested-by: Suravee Suthikulpanit <[email protected]> (AMD Seattle) Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Will Deacon <[email protected]> CC: Joerg Roedel <[email protected]> CC: Grant Likely <[email protected]> CC: Russell King <[email protected]> CC: Arnd Bergmann <[email protected]>
This commit is contained in:
parent
c517d838eb
commit
ed74862103
3 changed files with 13 additions and 5 deletions
|
|
@ -196,7 +196,7 @@ static void of_dma_configure(struct device *dev)
|
|||
dev_dbg(dev, "device is%sdma coherent\n",
|
||||
coherent ? " " : " not ");
|
||||
|
||||
iommu = of_iommu_configure(dev);
|
||||
iommu = of_iommu_configure(dev, dev->of_node);
|
||||
dev_dbg(dev, "device is%sbehind an iommu\n",
|
||||
iommu ? " " : " not ");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue