* [PATCH v1] memory: tegra: Register SMMU after MC driver became ready
@ 2018-05-08 16:55 Dmitry Osipenko
2018-05-18 10:32 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2018-05-08 16:55 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter; +Cc: linux-tegra, linux-kernel
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>
---
drivers/memory/tegra/mc.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index 49dd7ad1459f..22ec959db7d3 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -692,15 +692,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",
@@ -726,6 +717,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;
}
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] memory: tegra: Register SMMU after MC driver became ready
2018-05-08 16:55 [PATCH v1] memory: tegra: Register SMMU after MC driver became ready Dmitry Osipenko
@ 2018-05-18 10:32 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2018-05-18 10:32 UTC (permalink / raw)
To: Dmitry Osipenko; +Cc: Jonathan Hunter, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On Tue, May 08, 2018 at 07:55:30PM +0300, Dmitry Osipenko wrote:
> 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>
> ---
> drivers/memory/tegra/mc.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-18 10:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-08 16:55 [PATCH v1] memory: tegra: Register SMMU after MC driver became ready Dmitry Osipenko
2018-05-18 10:32 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).