提交 9a4d3bf5 编写于 作者: W Wan Zongshun 提交者: Joerg Roedel

iommu/amd: Set AMD iommu callbacks for amba bus

AMD Uart DMA belongs to ACPI HID type device, and its driver
is basing on AMBA Bus, need also IOMMU support.

This patch is just to set the AMD iommu callbacks for amba bus.
Signed-off-by: NWan Zongshun <Vincent.Wan@amd.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 b097d11a
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/ratelimit.h> #include <linux/ratelimit.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/amba/bus.h>
#include <linux/pci-ats.h> #include <linux/pci-ats.h>
#include <linux/bitmap.h> #include <linux/bitmap.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -2969,7 +2970,17 @@ static struct dma_map_ops amd_iommu_dma_ops = { ...@@ -2969,7 +2970,17 @@ static struct dma_map_ops amd_iommu_dma_ops = {
int __init amd_iommu_init_api(void) int __init amd_iommu_init_api(void)
{ {
return bus_set_iommu(&pci_bus_type, &amd_iommu_ops); int err = 0;
err = bus_set_iommu(&pci_bus_type, &amd_iommu_ops);
if (err)
return err;
#ifdef CONFIG_ARM_AMBA
err = bus_set_iommu(&amba_bustype, &amd_iommu_ops);
if (err)
return err;
#endif
return 0;
} }
int __init amd_iommu_init_dma_ops(void) int __init amd_iommu_init_dma_ops(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册