diff mbox

[1/2] ARM: tegra: Correct Tegra30 SMMU register map

Message ID 1383796706-10729-2-git-send-email-markz@nvidia.com
State Rejected, archived
Headers show

Commit Message

Mark Zhang Nov. 7, 2013, 3:58 a.m. UTC
Correct Tegra30 SMMU register map.

Signed-off-by: Mark Zhang <markz@nvidia.com>
---
 arch/arm/boot/dts/tegra30.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Stephen Warren Nov. 12, 2013, 7:19 p.m. UTC | #1
On 11/06/2013 08:58 PM, Mark Zhang wrote:
> Correct Tegra30 SMMU register map.

Some more explanation is required here re: why this layout is more
correct than what's there.

Do you need to edit the reg property in Tegra30's memory-controller node
too; that's what all these reg ranges are interleaved with, so
presumably if there was a mistake in the SMMU ranges, there's the
equivalent inverse mistake in the MC's ranges?

The DT binding for nvidia,tegra30-smmu states that reg should include
precisely 3 entries. This patch no longer conforms to that. The binding
needs to be re-written to explain the interleaving issue, and say that
an arbitrary number of ranges may be provided. The same issue exists in
the nvidia,tegra30-mc DT binding.

I think I'm beginning to regret separating out the MC and SMMU into
separate DT nodes:-(
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Zhang Nov. 13, 2013, 1:14 a.m. UTC | #2
Hiroshi has mentioned that the TRM should be revised. :)
Because there are some registers which are needed by SMMU driver while
they're not in TRM yet.

So this patch doesn't make sense now. Thanks for the review.

Mark
On 11/13/2013 03:19 AM, Stephen Warren wrote:
> On 11/06/2013 08:58 PM, Mark Zhang wrote:
>> Correct Tegra30 SMMU register map.
> 
> Some more explanation is required here re: why this layout is more
> correct than what's there.
> 
> Do you need to edit the reg property in Tegra30's memory-controller node
> too; that's what all these reg ranges are interleaved with, so
> presumably if there was a mistake in the SMMU ranges, there's the
> equivalent inverse mistake in the MC's ranges?
> 
> The DT binding for nvidia,tegra30-smmu states that reg should include
> precisely 3 entries. This patch no longer conforms to that. The binding
> needs to be re-written to explain the interleaving issue, and say that
> an arbitrary number of ranges may be provided. The same issue exists in
> the nvidia,tegra30-mc DT binding.
> 
> I think I'm beginning to regret separating out the MC and SMMU into
> separate DT nodes:-(
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hiroshi Doyu Nov. 13, 2013, 5:56 a.m. UTC | #3
On Tue, 12 Nov 2013 20:19:04 +0100
Stephen Warren <swarren@wwwdotorg.org> wrote:

> On 11/06/2013 08:58 PM, Mark Zhang wrote:
> > Correct Tegra30 SMMU register map.
> 
> Some more explanation is required here re: why this layout is more
> correct than what's there.
> 
> Do you need to edit the reg property in Tegra30's memory-controller node
> too; that's what all these reg ranges are interleaved with, so
> presumably if there was a mistake in the SMMU ranges, there's the
> equivalent inverse mistake in the MC's ranges?
> 
> The DT binding for nvidia,tegra30-smmu states that reg should include
> precisely 3 entries. This patch no longer conforms to that. The binding
> needs to be re-written to explain the interleaving issue, and say that
> an arbitrary number of ranges may be provided. The same issue exists in
> the nvidia,tegra30-mc DT binding.
> 
> I think I'm beginning to regret separating out the MC and SMMU into
> separate DT nodes:-(

What's difficult is that how to handle the undocumented register area.
If we get rid of undocumented/reserved register area, then the number
of banks in SMMU/MC would increase unnecessarily. But practically we
can handle MC/SMMU multi register banks by just identifying MC/SMMU
portion with checking undocumented ones.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 2bd55cfd88ad..5f56243cc3f5 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -527,9 +527,12 @@ 
 
 	iommu {
 		compatible = "nvidia,tegra30-smmu";
-		reg = <0x7000f010 0x02c
-		       0x7000f1f0 0x010
-		       0x7000f228 0x05c>;
+		reg = <0x7000f010 0x014
+		       0x7000f030 0x00c
+		       0x7000f228 0x00c
+		       0x7000f238 0x024
+		       0x7000f264 0x010
+		       0x7000f278 0x00c>;
 		nvidia,#asids = <4>;		/* # of ASIDs */
 		dma-window = <0 0x40000000>;	/* IOVA start & length */
 		nvidia,ahb = <&ahb>;