summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2021-09-15 11:55:15 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-09-20 10:33:28 +0200
commit13324edbe9269e6fbca4d0f5146b18ef8478c958 (patch)
treed9f20cecf7e1f11ca315d3e257343b259563fa16 /drivers/memory
parent77b14c9d05bd72d6a3f11b4982591d6cb0090ffe (diff)
downloadlinux-13324edbe9269e6fbca4d0f5146b18ef8478c958.tar.bz2
memory: tegra186-emc: Handle errors in BPMP response
The return value from tegra_bpmp_transfer indicates the success or failure of the IPC transaction with BPMP. If the transaction succeeded, we also need to check the actual command's result code. Add code to do this. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Link: https://lore.kernel.org/r/20210915085517.1669675-3-mperttunen@nvidia.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/tegra/tegra186-emc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
index d65e7c2a580b..abc0c2eeaab7 100644
--- a/drivers/memory/tegra/tegra186-emc.c
+++ b/drivers/memory/tegra/tegra186-emc.c
@@ -197,6 +197,10 @@ static int tegra186_emc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to EMC DVFS pairs: %d\n", err);
goto put_bpmp;
}
+ if (msg.rx.ret < 0) {
+ dev_err(&pdev->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret);
+ goto put_bpmp;
+ }
emc->debugfs.min_rate = ULONG_MAX;
emc->debugfs.max_rate = 0;