diff options
author | Sameer Pujar <spujar@nvidia.com> | 2022-01-12 14:56:46 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2022-04-04 11:14:13 +0200 |
commit | d1da1052ffad63aa5181b69f20a6952e31f339c2 (patch) | |
tree | 457fbb0985046cd3a267cc1cb11cc96136e3ae76 | |
parent | reset: renesas: Check return value of reset_control_deassert() (diff) | |
download | linux-d1da1052ffad63aa5181b69f20a6952e31f339c2.tar.xz linux-d1da1052ffad63aa5181b69f20a6952e31f339c2.zip |
reset: tegra-bpmp: Restore Handle errors in BPMP response
This reverts following commit 69125b4b9440 ("reset: tegra-bpmp: Revert
Handle errors in BPMP response").
The Tegra194 HDA reset failure is fixed by commit d278dc9151a0 ("ALSA:
hda/tegra: Fix Tegra194 HDA reset failure"). The temporary revert of
original commit c045ceb5a145 ("reset: tegra-bpmp: Handle errors in BPMP
response") can be removed now.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/1641995806-15245-1-git-send-email-spujar@nvidia.com
-rw-r--r-- | drivers/reset/tegra/reset-bpmp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/reset/tegra/reset-bpmp.c b/drivers/reset/tegra/reset-bpmp.c index 24d3395964cc..4c5bba52b105 100644 --- a/drivers/reset/tegra/reset-bpmp.c +++ b/drivers/reset/tegra/reset-bpmp.c @@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc); struct mrq_reset_request request; struct tegra_bpmp_message msg; + int err; memset(&request, 0, sizeof(request)); request.cmd = command; @@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, msg.tx.data = &request; msg.tx.size = sizeof(request); - return tegra_bpmp_transfer(bpmp, &msg); + err = tegra_bpmp_transfer(bpmp, &msg); + if (err) + return err; + if (msg.rx.ret) + return -EINVAL; + + return 0; } static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc, |