Re: [PATCH 03/23] ARM: dt: tegra30: iommu: Add "nvidia,memory-clients"

2013-06-27 Thread Thierry Reding
On Wed, Jun 26, 2013 at 12:28:06PM +0300, Hiroshi Doyu wrote:
[...]
> diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt 
> b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt
[...]
> @@ -23,3 +24,13 @@ Example:
>   nvidia,swgroups = <0x 0x000779ff>;
>   nvidia,ahb = <&ahb>;
>   };
> +
> + host1x {
> + compatible = "nvidia,tegra30-host1x", "simple-bus";
> + nvidia,memory-clients = ;

And this could use the SWGID(HC) to match up with how GPIOs are
referenced in the DTS files. Though I see that the clocks don't use a
parameterized version either, so things are inconsistent anyway. But if
SWGID() isn't used then maybe it shouldn't be provided by the header
file in the first place.

Oh, one other thing: both GPIO and CAR use the TEGRA_ prefix, perhaps
this should use it as well?

> diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
[...]
> index 14ec3f9..3fcee3f 100644
> --- a/arch/arm/boot/dts/tegra30.dtsi
> +++ b/arch/arm/boot/dts/tegra30.dtsi
> @@ -1,5 +1,6 @@
>  #include 
>  #include 
> +#include 
>  #include 

Nit: these includes seem to be ordered alphabetically; if so then iommu
should go below interrupt-controller.

> @@ -286,6 +300,7 @@
>   interrupts = ;
>   nvidia,dma-request-selector = <&apbdma 20>;
>   clocks = <&tegra_car TEGRA30_CLK_UARTE>;
> + nvidia,memory-clients = <14>;

SWGID_PPCS?

Thierry


pgpi4eij0DQCo.pgp
Description: PGP signature
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 03/23] ARM: dt: tegra30: iommu: Add "nvidia,memory-clients"

2013-06-27 Thread Thierry Reding
On Wed, Jun 26, 2013 at 12:18:17PM +0200, Thierry Reding wrote:
> On Wed, Jun 26, 2013 at 12:28:06PM +0300, Hiroshi Doyu wrote:
> [...]
> > diff --git 
> > a/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt 
> > b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt
> [...]
> > @@ -23,3 +24,13 @@ Example:
> > nvidia,swgroups = <0x 0x000779ff>;
> > nvidia,ahb = <&ahb>;
> > };
> > +
> > +   host1x {
> > +   compatible = "nvidia,tegra30-host1x", "simple-bus";
> > +   nvidia,memory-clients = ;
> 
> And this could use the SWGID(HC) to match up with how GPIOs are
> referenced in the DTS files.

Scratch that. SWGID() yields a mask for the corresponding swgroup so
it's not the same thing.

Thierry


pgp3NHzNB8807.pgp
Description: PGP signature
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 03/23] ARM: dt: tegra30: iommu: Add "nvidia,memory-clients"

2013-06-27 Thread Thierry Reding
On Wed, Jun 26, 2013 at 12:28:06PM +0300, Hiroshi Doyu wrote:
> Add "nvidia,memory-clients" to identify which swgroup ID a device
> belongs to.

Why not call the property "nvidia,swgid" instead? That seems a lot more
intuitive.

Thierry


pgpsrF4R4_pOe.pgp
Description: PGP signature
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu