diff options
author | Andy Gross <andy.gross@linaro.org> | 2017-01-16 23:24:15 -0600 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2017-01-16 23:45:04 -0600 |
commit | a811b420b6c13759540070c0e9541b7cd8569168 (patch) | |
tree | 29a25adf699ded7909e3075dd3a1e30deacaccdd /drivers/firmware/qcom_scm-32.c | |
parent | 472cef345ca0879ef56ec593db5fb21afc87ed6c (diff) |
firmware: qcom_scm: Add set remote state API
This patch adds a set remote state SCM API. This will be used by the
Venus and GPU subsystems to set state on the remote processors.
This work was based on two patch sets by Jordan Crouse and Stanimir
Varbanov.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/firmware/qcom_scm-32.c')
-rw-r--r-- | drivers/firmware/qcom_scm-32.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/firmware/qcom_scm-32.c b/drivers/firmware/qcom_scm-32.c index c6aeedbdcbb0..8ad226c60374 100644 --- a/drivers/firmware/qcom_scm-32.c +++ b/drivers/firmware/qcom_scm-32.c @@ -560,3 +560,21 @@ int __qcom_scm_pas_mss_reset(struct device *dev, bool reset) return ret ? : le32_to_cpu(out); } + +int __qcom_scm_set_remote_state(struct device *dev, u32 state, u32 id) +{ + struct { + __le32 state; + __le32 id; + } req; + __le32 scm_ret = 0; + int ret; + + req.state = cpu_to_le32(state); + req.id = cpu_to_le32(id); + + ret = qcom_scm_call(dev, QCOM_SCM_SVC_BOOT, QCOM_SCM_SET_REMOTE_STATE, + &req, sizeof(req), &scm_ret, sizeof(scm_ret)); + + return ret ? : le32_to_cpu(scm_ret); +} |