diff options
author | Wan Zongshun <Vincent.Wan@amd.com> | 2016-05-10 09:21:01 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-06-15 06:00:10 -0400 |
commit | 0076cd3d063a43f69eba2d0a1d13927897c8ed35 (patch) | |
tree | 61aa18577cce2a4417fb2ee609b3a093ec4d7b6f | |
parent | 5edb56491d4812c42175980759da53388e5d86f5 (diff) |
iommu/amd: Set AMD iommu callbacks for platform bus driver
AMD has more drivers will use ACPI to platform bus driver later,
all those devices need iommu support, for example: eMMC driver.
For latest AMD eMMC controller, it will utilize sdhci-acpi.c driver,
which will rely on platform bus to match device and driver, where we
will set 'dev' of struct platform_device as map_sg parameter passing
to iommu driver for DMA request, so the iommu-ops are needed on the
platform bus.
Signed-off-by: Wan Zongshun <Vincent.Wan@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/amd_iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 634f636393d5..921111e65c8c 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/acpi.h> | 22 | #include <linux/acpi.h> |
23 | #include <linux/amba/bus.h> | 23 | #include <linux/amba/bus.h> |
24 | #include <linux/platform_device.h> | ||
24 | #include <linux/pci-ats.h> | 25 | #include <linux/pci-ats.h> |
25 | #include <linux/bitmap.h> | 26 | #include <linux/bitmap.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
@@ -2958,6 +2959,9 @@ int __init amd_iommu_init_api(void) | |||
2958 | if (err) | 2959 | if (err) |
2959 | return err; | 2960 | return err; |
2960 | #endif | 2961 | #endif |
2962 | err = bus_set_iommu(&platform_bus_type, &amd_iommu_ops); | ||
2963 | if (err) | ||
2964 | return err; | ||
2961 | return 0; | 2965 | return 0; |
2962 | } | 2966 | } |
2963 | 2967 | ||