diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2018-05-08 19:55:30 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-05-18 13:31:55 +0300 |
commit | 45a81df06eeb320093b06132870e7ecd646db3f0 (patch) | |
tree | 06a73674fcd9b900f47ad4e607aaac568bd1c663 /drivers/memory | |
parent | 273d760060e365c37e6e5bb3c0810a5b93fa569d (diff) | |
download | linux-45a81df06eeb320093b06132870e7ecd646db3f0.tar.xz |
memory: tegra: Register SMMU after MC driver became ready
Memory Controller driver invokes SMMU driver registration and MC's
registers mapping is shared with SMMU. This mapping goes away if MC
driver probing fails after SMMU registration.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/mc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index c81d01caf1a8..bb93cc53554e 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -672,15 +672,6 @@ static int tegra_mc_probe(struct platform_device *pdev) return err; } - if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU)) { - mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc); - if (IS_ERR(mc->smmu)) { - dev_err(&pdev->dev, "failed to probe SMMU: %ld\n", - PTR_ERR(mc->smmu)); - return PTR_ERR(mc->smmu); - } - } - err = tegra_mc_reset_setup(mc); if (err < 0) { dev_err(&pdev->dev, "failed to register reset controller: %d\n", @@ -706,6 +697,15 @@ static int tegra_mc_probe(struct platform_device *pdev) return err; } + if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU)) { + mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc); + if (IS_ERR(mc->smmu)) { + dev_err(&pdev->dev, "failed to probe SMMU: %ld\n", + PTR_ERR(mc->smmu)); + return PTR_ERR(mc->smmu); + } + } + return 0; } |