Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs

2020-05-18 Thread Joerg Roedel
Hi, On Mon, May 18, 2020 at 02:51:20PM +0800, Yong Wu wrote: > below is my local patch. split "dma_attach" to attach_device and > probe_finalize. About attach_device, Use the existed > __iommu_attach_group instead. Then rename from the "dma_attach" to > "probe_finalize" to do the probe_finalize jo

Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs

2020-05-17 Thread Yong Wu
On Fri, 2020-05-15 at 12:07 +0200, Joerg Roedel wrote: > Hi, > > On Fri, May 15, 2020 at 03:44:59PM +0800, Yong Wu wrote: > > On Tue, 2020-04-14 at 15:15 +0200, Joerg Roedel wrote: > > > - return iommu_device_link(&data->iommu, dev); > > > + err = arm_iommu_attach_device(dev, mtk_mapping); > > > +

Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs

2020-05-15 Thread Joerg Roedel
Hi, On Fri, May 15, 2020 at 03:44:59PM +0800, Yong Wu wrote: > On Tue, 2020-04-14 at 15:15 +0200, Joerg Roedel wrote: > > - return iommu_device_link(&data->iommu, dev); > > + err = arm_iommu_attach_device(dev, mtk_mapping); > > + if (err) > > + dev_err(dev, "Can't create IOMMU mapp

Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs

2020-05-15 Thread Yong Wu
On Tue, 2020-04-14 at 15:15 +0200, Joerg Roedel wrote: > From: Joerg Roedel > > Convert the Mediatek-v1 IOMMU driver to use the probe_device() and > release_device() call-backs of iommu_ops, so that the iommu core code > does the group and sysfs setup. > > Signed-off-by: Joerg Roedel > --- > d