Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-03 Thread Will Deacon
On Tue, Sep 02, 2014 at 09:59:41PM +0100, jroe...@suse.de wrote: > On Tue, Sep 02, 2014 at 04:01:32PM +0200, Arnd Bergmann wrote: > > This is an artifact of the API being single-instance at the moment. > > We might not in fact need it, I was just trying to think of things > > that naturally fit in

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread jroe...@suse.de
On Tue, Sep 02, 2014 at 04:01:32PM +0200, Arnd Bergmann wrote: > This is an artifact of the API being single-instance at the moment. > We might not in fact need it, I was just trying to think of things > that naturally fit in there and that are probably already linked > together in the individual i

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Laurent Pinchart
Hi Will, On Tuesday 02 September 2014 12:03:40 Will Deacon wrote: > On Tue, Sep 02, 2014 at 11:51:54AM +0100, Laurent Pinchart wrote: > > On Friday 29 August 2014 16:54:27 Will Deacon wrote: [snip] > > > diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c > > > index f9209666157c..a

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Arnd Bergmann
On Tuesday 02 September 2014 15:03:14 Varun Sethi wrote: > Hi Thierry/Will/Arnd, > Where would the of_xlate callback reside and what would be its function? > It is an additional function pointer in iommu_ops and replaces the add_device callback for IOMMUs that are DT-enabled. The idea is that w

RE: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Varun Sethi
ll Deacon; jroe...@suse.de; iommu@lists.linux-foundation.org; Thierry > Reding; laurent.pinch...@ideasonboard.com; Sethi Varun-B16395; > dw...@infradead.org; hd...@nvidia.com > Subject: Re: [RFC PATCH 4/7] iommu: provide helper function to configure an > IOMMU for an of master > > O

RE: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Varun Sethi
inux-arm-ker...@lists.infradead.org; iommu@lists.linux-foundation.org > Cc: a...@arndb.de; dw...@infradead.org; jroe...@suse.de; > hd...@nvidia.com; Sethi Varun-B16395; thierry.red...@gmail.com; > laurent.pinch...@ideasonboard.com; Will Deacon > Subject: [RFC PATCH 4/7] iommu: provide helper

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Arnd Bergmann
On Tuesday 02 September 2014 14:05:08 Will Deacon wrote: > On Tue, Sep 02, 2014 at 01:15:06PM +0100, Arnd Bergmann wrote: > > > Anyway, I'll try to hack something together shortly. I think the proposal > > > is: > > > > > > - Make add_device_master_ids take a generic structure (struct iommu) >

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Will Deacon
On Tue, Sep 02, 2014 at 01:15:06PM +0100, Arnd Bergmann wrote: > On Tuesday 02 September 2014 11:03:42 Will Deacon wrote: > > On Mon, Sep 01, 2014 at 09:18:26PM +0100, Arnd Bergmann wrote: > > > I don't mind handling PCI devices separately. They are different in a > > > number > > > of ways alread

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Arnd Bergmann
On Tuesday 02 September 2014 11:03:42 Will Deacon wrote: > On Mon, Sep 01, 2014 at 09:18:26PM +0100, Arnd Bergmann wrote: > > On Monday 01 September 2014 17:40:00 Will Deacon wrote: > > > On Mon, Sep 01, 2014 at 03:46:18PM +0100, Arnd Bergmann wrote: > > > > On Monday 01 September 2014 10:29:40 Thi

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Will Deacon
On Tue, Sep 02, 2014 at 11:51:54AM +0100, Laurent Pinchart wrote: > Hi Will, Hi Laurent, > On Friday 29 August 2014 16:54:27 Will Deacon wrote: > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > index dd5112265cc9..6d13f962f156 100644 > > --- a/drivers/iommu/Kconfig > > +++ b/driv

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Laurent Pinchart
Hi Will, Thank you for the patch. On Friday 29 August 2014 16:54:27 Will Deacon wrote: > The generic IOMMU device-tree bindings can be used to add arbitrary OF > masters to an IOMMU with a compliant binding. > > This patch introduces of_iommu_configure, which does exactly that. > > Signed-off-b

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Laurent Pinchart
On Monday 01 September 2014 16:46:18 Arnd Bergmann wrote: > On Monday 01 September 2014 10:29:40 Thierry Reding wrote: > > I think this could use a bit more formalization. As I said in another > > reply earlier, there's very little standardization in the IOMMU API. > > That certainly gives us a lot

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-02 Thread Will Deacon
On Mon, Sep 01, 2014 at 09:18:26PM +0100, Arnd Bergmann wrote: > On Monday 01 September 2014 17:40:00 Will Deacon wrote: > > On Mon, Sep 01, 2014 at 03:46:18PM +0100, Arnd Bergmann wrote: > > > On Monday 01 September 2014 10:29:40 Thierry Reding wrote: > > > > > > > > I think this could use a bit

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-01 Thread Arnd Bergmann
On Monday 01 September 2014 17:40:00 Will Deacon wrote: > On Mon, Sep 01, 2014 at 03:46:18PM +0100, Arnd Bergmann wrote: > > On Monday 01 September 2014 10:29:40 Thierry Reding wrote: > > > > > > I think this could use a bit more formalization. As I said in another > > > reply earlier, there's ver

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-01 Thread Will Deacon
On Mon, Sep 01, 2014 at 03:46:18PM +0100, Arnd Bergmann wrote: > On Monday 01 September 2014 10:29:40 Thierry Reding wrote: > > > > I think this could use a bit more formalization. As I said in another > > reply earlier, there's very little standardization in the IOMMU API. > > That certainly give

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-01 Thread Arnd Bergmann
On Monday 01 September 2014 10:29:40 Thierry Reding wrote: > > I think this could use a bit more formalization. As I said in another > reply earlier, there's very little standardization in the IOMMU API. > That certainly gives us a lot of flexibility but it also has the > downside that it's diffic

Re: [RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-01 Thread Thierry Reding
On Fri, Aug 29, 2014 at 04:54:27PM +0100, Will Deacon wrote: > The generic IOMMU device-tree bindings can be used to add arbitrary OF > masters to an IOMMU with a compliant binding. > > This patch introduces of_iommu_configure, which does exactly that. > > Signed-off-by: Will Deacon > --- > dri

[RFC PATCH 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-08-29 Thread Will Deacon
The generic IOMMU device-tree bindings can be used to add arbitrary OF masters to an IOMMU with a compliant binding. This patch introduces of_iommu_configure, which does exactly that. Signed-off-by: Will Deacon --- drivers/iommu/Kconfig| 2 +- drivers/iommu/of_iommu.c | 36