firmware: tegra: Propagate error code to caller

Response messages from Tegra BPMP firmware contain an error return code
as the first word of payload. The error code is used to indicate
incorrectly formatted request message or use of non-existing resource
(clk, reset, powergate) identifier. Current implementation of
tegra_bpmp_transfer() ignores this code and does not pass it to caller.
Fix this by adding an extra struct member to tegra_bpmp_message and
populate that with return code.

Signed-off-by: Timo Alho <talho@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Timo Alho
2017-09-07 12:31:01 +03:00
committed by Thierry Reding
parent 2bd6bf03f4
commit 370d010f0e
2 changed files with 17 additions and 6 deletions

View File

@@ -110,6 +110,7 @@ struct tegra_bpmp_message {
struct {
void *data;
size_t size;
int ret;
} rx;
};