Re: [PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
On Tue, May 10, 2016 at 09:21:01AM -0400, Wan Zongshun wrote: > From: Wan Zongshun> > 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 Applied, thanks.
Re: [PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
On Tue, May 10, 2016 at 09:21:01AM -0400, Wan Zongshun wrote: > From: Wan Zongshun > > 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 Applied, thanks.
Re: [PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
2016-05-10 21:21 GMT+08:00 Wan Zongshun: > From: Wan Zongshun > > 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. Joerg, How about this patch? it will impact our new eMMC controller driver bringup. Thanks. > > Signed-off-by: Wan Zongshun > > --- > changes from v1: Add comment why the iommu-ops are needed on platform bus. > --- > drivers/iommu/amd_iommu.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > index c430c10..547cdd4 100644 > --- a/drivers/iommu/amd_iommu.c > +++ b/drivers/iommu/amd_iommu.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -2980,6 +2981,9 @@ int __init amd_iommu_init_api(void) > if (err) > return err; > #endif > + err = bus_set_iommu(_bus_type, _iommu_ops); > + if (err) > + return err; > return 0; > } > > -- > 1.9.1 > -- --- Vincent Wan(Zongshun) www.mcuos.com
Re: [PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
2016-05-10 21:21 GMT+08:00 Wan Zongshun : > From: Wan Zongshun > > 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. Joerg, How about this patch? it will impact our new eMMC controller driver bringup. Thanks. > > Signed-off-by: Wan Zongshun > > --- > changes from v1: Add comment why the iommu-ops are needed on platform bus. > --- > drivers/iommu/amd_iommu.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > index c430c10..547cdd4 100644 > --- a/drivers/iommu/amd_iommu.c > +++ b/drivers/iommu/amd_iommu.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -2980,6 +2981,9 @@ int __init amd_iommu_init_api(void) > if (err) > return err; > #endif > + err = bus_set_iommu(_bus_type, _iommu_ops); > + if (err) > + return err; > return 0; > } > > -- > 1.9.1 > -- --- Vincent Wan(Zongshun) www.mcuos.com
[PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
From: Wan ZongshunAMD 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 --- changes from v1: Add comment why the iommu-ops are needed on platform bus. --- drivers/iommu/amd_iommu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index c430c10..547cdd4 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -2980,6 +2981,9 @@ int __init amd_iommu_init_api(void) if (err) return err; #endif + err = bus_set_iommu(_bus_type, _iommu_ops); + if (err) + return err; return 0; } -- 1.9.1
[PATCH v2] iommu/amd: Set AMD iommu callbacks for platform bus driver
From: Wan Zongshun 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 --- changes from v1: Add comment why the iommu-ops are needed on platform bus. --- drivers/iommu/amd_iommu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index c430c10..547cdd4 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -2980,6 +2981,9 @@ int __init amd_iommu_init_api(void) if (err) return err; #endif + err = bus_set_iommu(_bus_type, _iommu_ops); + if (err) + return err; return 0; } -- 1.9.1