remoteproc: qcom: q6v5-mss: Refactor mba load/unload sequence
authorSibi Sankar <sibis@codeaurora.org>
Wed, 17 Oct 2018 13:55:25 +0000 (19:25 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 19 Oct 2018 19:54:02 +0000 (12:54 -0700)
commit0304530ddd29300aed7ef6e5b2fd409c7a0162e6
treedf9f2d5c19533aa5c8960fb2dd73261ec5842e98
parentab8f873bb90da7bbe40e2f41c92a4971c4f0dc76
remoteproc: qcom: q6v5-mss: Refactor mba load/unload sequence

Refactor re-useable parts of mba load/unload sequence into mba_load and
mba_reclaim respectively. This is done in order to prevent code duplication
for modem coredump, which requires the mba to be loaded before dumping
the segments. The following changes in functionality are intended:

* Add software bypass to avoid high MX current in mpss error path.
* Remove the proxy votes of clk/regs only after the active/reset clks/regs.
* Reclaim MBA memory after mpss_load failure in mba_reclaim func.
* Set/Unset the dump_mba_loaded flag on mba_load/mba_reclaim respectively.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/qcom_q6v5_mss.c