Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Thierry Reding
On Fri, May 30, 2014 at 09:54:37PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: IIUC the original problem, a master with 8 streamIDs means something like below, where some devices have multiple IDs but some have a single. A sinle #address-cells cannot

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Arnd Bergmann
On Wednesday 04 June 2014 15:44:03 Thierry Reding wrote: Well, the iommu specific binding could allow a variable #address-cells. That way, you just need to know the number of stream IDs for that instance of the iommu. That sounds fairly complicated to me. I don't see what that buys us

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Will Deacon
On Wed, Jun 04, 2014 at 02:44:03PM +0100, Thierry Reding wrote: On Fri, May 30, 2014 at 09:54:37PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: The disadvantage of this is that this limits the max number of streamIDs to support. If # of streamID is

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Arnd Bergmann
On Wednesday 04 June 2014 14:56:01 Will Deacon wrote: On Wed, Jun 04, 2014 at 02:44:03PM +0100, Thierry Reding wrote: On Fri, May 30, 2014 at 09:54:37PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: The disadvantage of this is that this limits the max

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Thierry Reding
On Mon, Jun 02, 2014 at 11:41:04AM +0100, Dave Martin wrote: On Fri, May 30, 2014 at 09:49:59PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 14:31:55 Rob Herring wrote: On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 30 May 2014 08:16:05 Rob Herring

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Will Deacon
On Wed, Jun 04, 2014 at 03:01:15PM +0100, Arnd Bergmann wrote: On Wednesday 04 June 2014 14:56:01 Will Deacon wrote: On Wed, Jun 04, 2014 at 02:44:03PM +0100, Thierry Reding wrote: On Fri, May 30, 2014 at 09:54:37PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 22:29:13 Hiroshi Doyu

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Will Deacon
On Wed, Jun 04, 2014 at 03:35:10PM +0100, Thierry Reding wrote: On Mon, Jun 02, 2014 at 11:41:04AM +0100, Dave Martin wrote: In the strictest sense, no. But for a large set of sane configurations, this probably works. Small sets of randomly-assigned IDs can just be enumerated one by

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Thierry Reding
On Wed, Jun 04, 2014 at 05:41:32PM +0100, Will Deacon wrote: On Wed, Jun 04, 2014 at 03:35:10PM +0100, Thierry Reding wrote: On Mon, Jun 02, 2014 at 11:41:04AM +0100, Dave Martin wrote: In the strictest sense, no. But for a large set of sane configurations, this probably works.

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Thierry Reding
On Fri, May 30, 2014 at 12:27:28PM +0100, Dave Martin wrote: On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: [...] Arnd, can you take another look at this binding and see if there's anything else missing? If not I'll go through the document again and update all

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-04 Thread Thierry Reding
On Fri, May 30, 2014 at 09:01:19PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 12:22:32 Dave Martin wrote: + +Examples: += + +Single-master IOMMU: + + + iommu { + #address-cells = 0; + #size-cells = 0; + }; +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:01:19PM +0200, Arnd Bergmann wrote: > On Friday 30 May 2014 12:22:32 Dave Martin wrote: > > > + > > > +Examples: > > > += > > > + > > > +Single-master IOMMU: > > > + > > > + > > > + iommu { > > > + #address-cells = <0>; > > > +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:11:07PM +0200, Arnd Bergmann wrote: > On Friday 30 May 2014 12:27:28 Dave Martin wrote: > > On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: > > > On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: > > > > On 05/23/2014 02:36 PM, Thierry

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:49:59PM +0200, Arnd Bergmann wrote: > On Friday 30 May 2014 14:31:55 Rob Herring wrote: > > On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann wrote: > > > On Friday 30 May 2014 08:16:05 Rob Herring wrote: > > >> On Fri, May 23, 2014 at 3:33 PM, Thierry Reding > > >>

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:49:59PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 14:31:55 Rob Herring wrote: On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 30 May 2014 08:16:05 Rob Herring wrote: On Fri, May 23, 2014 at 3:33 PM, Thierry Reding

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:11:07PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 12:27:28 Dave Martin wrote: On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: On 05/23/2014 02:36 PM, Thierry Reding wrote:

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-02 Thread Dave Martin
On Fri, May 30, 2014 at 09:01:19PM +0200, Arnd Bergmann wrote: On Friday 30 May 2014 12:22:32 Dave Martin wrote: + +Examples: += + +Single-master IOMMU: + + + iommu { + #address-cells = 0; + #size-cells = 0; + }; +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-01 Thread Will Deacon
On Fri, May 30, 2014 at 08:54:37PM +0100, Arnd Bergmann wrote: > On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: > > Tegra,SMMU has a similar problem and we have used a fixed size bitmap(64 > > bit) to afford 64 stream IDs so that a single device can hold multiple > > IDs. If we apply the same

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-01 Thread Will Deacon
On Fri, May 30, 2014 at 08:54:37PM +0100, Arnd Bergmann wrote: On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: Tegra,SMMU has a similar problem and we have used a fixed size bitmap(64 bit) to afford 64 stream IDs so that a single device can hold multiple IDs. If we apply the same bitmap

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: > > IIUC the original problem, "a master with 8 streamIDs" means something > like below, where some devices have multiple IDs but some have a > single. A sinle #address-cells cannot afford those 2 masters at once. > >iommu { >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 14:31:55 Rob Herring wrote: > On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann wrote: > > On Friday 30 May 2014 08:16:05 Rob Herring wrote: > >> On Fri, May 23, 2014 at 3:33 PM, Thierry Reding > >> wrote: > >> > From: Thierry Reding > >> > +IOMMU master node: > >> >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Rob Herring
On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann wrote: > On Friday 30 May 2014 08:16:05 Rob Herring wrote: >> On Fri, May 23, 2014 at 3:33 PM, Thierry Reding >> wrote: >> > From: Thierry Reding >> > +IOMMU master node: >> > +== >> > + >> > +Devices that access memory through an

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Hiroshi Doyu
Arnd Bergmann writes: >> > +Multiple-master IOMMU: >> > +-- >> > + >> > + iommu { >> > + /* the specifier represents the ID of the master */ >> > + #address-cells = <1>; >> > + #size-cells = <0>; >> > + }; >> > + >> > +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 12:27:28 Dave Martin wrote: > On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: > > On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: > > > On 05/23/2014 02:36 PM, Thierry Reding wrote: > > > I think this is a mistake. address-cells/size-cells are

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 08:16:05 Rob Herring wrote: > On Fri, May 23, 2014 at 3:33 PM, Thierry Reding > wrote: > > From: Thierry Reding > > +IOMMU master node: > > +== > > + > > +Devices that access memory through an IOMMU are called masters. A device > > can > > +have multiple

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 12:22:32 Dave Martin wrote: > > + > > +Examples: > > += > > + > > +Single-master IOMMU: > > + > > + > > + iommu { > > + #address-cells = <0>; > > + #size-cells = <0>; > > + }; > > + > > + master { > > + iommus =

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Rob Herring
On Fri, May 23, 2014 at 3:33 PM, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra SMMU as >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Dave Martin
On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: > On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: > > On 05/23/2014 02:36 PM, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > This commit introduces a generic device tree binding for IOMMU devices. > > >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Dave Martin
On Fri, May 23, 2014 at 10:36:35PM +0200, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Thierry Reding
On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: > On 05/23/2014 02:36 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > This commit introduces a generic device tree binding for IOMMU devices. > > Only a very minimal subset is described here, but it is enough to cover > >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Thierry Reding
On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: On 05/23/2014 02:36 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com This commit introduces a generic device tree binding for IOMMU devices. Only a very minimal subset is described here, but it is enough to

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Dave Martin
On Fri, May 23, 2014 at 10:36:35PM +0200, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com This commit introduces a generic device tree binding for IOMMU devices. Only a very minimal subset is described here, but it is enough to cover the requirements of both the Exynos System

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Dave Martin
On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: On 05/23/2014 02:36 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com This commit introduces a generic device tree binding for IOMMU devices.

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Rob Herring
On Fri, May 23, 2014 at 3:33 PM, Thierry Reding thierry.red...@gmail.com wrote: From: Thierry Reding tred...@nvidia.com This commit introduces a generic device tree binding for IOMMU devices. Only a very minimal subset is described here, but it is enough to cover the requirements of both the

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 12:22:32 Dave Martin wrote: + +Examples: += + +Single-master IOMMU: + + + iommu { + #address-cells = 0; + #size-cells = 0; + }; + + master { + iommus = /iommu; + }; +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 08:16:05 Rob Herring wrote: On Fri, May 23, 2014 at 3:33 PM, Thierry Reding thierry.red...@gmail.com wrote: From: Thierry Reding tred...@nvidia.com +IOMMU master node: +== + +Devices that access memory through an IOMMU are called masters. A device

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 12:27:28 Dave Martin wrote: On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: On Thu, May 29, 2014 at 09:52:22AM -0600, Stephen Warren wrote: On 05/23/2014 02:36 PM, Thierry Reding wrote: I think this is a mistake. address-cells/size-cells are for

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Hiroshi Doyu
Arnd Bergmann a...@arndb.de writes: +Multiple-master IOMMU: +-- + + iommu { + /* the specifier represents the ID of the master */ + #address-cells = 1; + #size-cells = 0; + }; + + master { +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Rob Herring
On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 30 May 2014 08:16:05 Rob Herring wrote: On Fri, May 23, 2014 at 3:33 PM, Thierry Reding thierry.red...@gmail.com wrote: From: Thierry Reding tred...@nvidia.com +IOMMU master node: +== +

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 14:31:55 Rob Herring wrote: On Fri, May 30, 2014 at 2:06 PM, Arnd Bergmann a...@arndb.de wrote: On Friday 30 May 2014 08:16:05 Rob Herring wrote: On Fri, May 23, 2014 at 3:33 PM, Thierry Reding thierry.red...@gmail.com wrote: From: Thierry Reding tred...@nvidia.com

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-30 Thread Arnd Bergmann
On Friday 30 May 2014 22:29:13 Hiroshi Doyu wrote: IIUC the original problem, a master with 8 streamIDs means something like below, where some devices have multiple IDs but some have a single. A sinle #address-cells cannot afford those 2 masters at once. iommu { /*

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-29 Thread Stephen Warren
On 05/23/2014 02:36 PM, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra SMMU as >

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-05-29 Thread Stephen Warren
On 05/23/2014 02:36 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com This commit introduces a generic device tree binding for IOMMU devices. Only a very minimal subset is described here, but it is enough to cover the requirements of both the Exynos System MMU and Tegra SMMU

<    1   2