Thread (20 messages) 20 messages, 3 authors, 2012-05-07

[PATCHv3 3/4] iommu/tegra: smmu: Refrain from accessing to AHB

From: Hiroshi Doyu <hidden>
Date: 2012-05-04 06:34:13
Also in: linux-tegra, lkml

From: Stephen Warren <redacted>
Subject: Re: [PATCHv3 3/4] iommu/tegra: smmu: Refrain from accessing to AHB
Date: Thu, 3 May 2012 19:48:25 +0200
Message-ID: [ref]
On 05/03/2012 10:05 AM, Hiroshi DOYU wrote:
quoted
Use "tegra_ahb_enable_smmu()" to inform AHB that SMMU is
ready, instead of directly aceessing AHB registers.
You need to make the Kconfig option for the SMMU either depend on or
select the TEGRA_AHB option. If you don't, then if someone disables the
AHB driver, the SMMU driver may still build, yet fail to link since the
AHB API it calls doesn't exist.
quoted
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
quoted
@@ -398,10 +388,8 @@ static void smmu_setup_regs(struct smmu_device *smmu)
 
 	smmu_flush_regs(smmu, 1);
 
-	val = ahb_read(smmu, AHB_XBAR_CTRL);
-	val |= AHB_XBAR_CTRL_SMMU_INIT_DONE_DONE <<
-		AHB_XBAR_CTRL_SMMU_INIT_DONE_SHIFT;
-	ahb_write(smmu, val, AHB_XBAR_CTRL);
+	err = tegra_ahb_enable_smmu(smmu->ahb);
+	return err;
You can just "return tegra_ahb_..." here.
quoted
@@ -911,14 +899,16 @@ static int tegra_smmu_probe(struct platform_device *pdev)
quoted
+	smmu->ahb = of_parse_phandle(pdev->dev.of_node, "ahb", 0);
Hmm, "ahb" should probably be "nvidia,ahb".
Does this mean the following in dts?

	ahb: ahb at 6000c004 {
		compatible = "nvidia,tegra30-ahb";
		reg = <0x6000c004 0x14c>; /* AHB Arbitration + Gizmo Controller */
	};

	smmu: smmu at 7000f000 {
		nvidia,ahb = &ahb;
	};      ^^^^^^^^^^
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help