mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
clk: qcom: clk-aop-qmp: Do not send duplicate requests to AOP
Currently, duplicate enable requests are sent for the qdss_qmp_clk during its registration. This is not ideal behavior and should be corrected. Change-Id: I1d66ad83fe9c109a88df527ef3fae5fc60e855e7 Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
This commit is contained in:
parent
cb78b109a6
commit
a473903674
1 changed files with 9 additions and 0 deletions
|
|
@ -129,6 +129,12 @@ static int clk_aop_qmp_prepare(struct clk_hw *hw)
|
|||
struct clk_aop_qmp *clk = to_aop_qmp_clk(hw);
|
||||
|
||||
mutex_lock(&clk_aop_lock);
|
||||
/*
|
||||
* Return early if the clock has been enabled already. This
|
||||
* is to avoid issues with sending duplicate enable requests.
|
||||
*/
|
||||
if (clk->enabled)
|
||||
goto err;
|
||||
|
||||
if (clk->level)
|
||||
rate = clk->level;
|
||||
|
|
@ -167,6 +173,9 @@ static void clk_aop_qmp_unprepare(struct clk_hw *hw)
|
|||
|
||||
mutex_lock(&clk_aop_lock);
|
||||
|
||||
if (!clk->enabled)
|
||||
goto err;
|
||||
|
||||
rate = clk->disable_state;
|
||||
|
||||
snprintf(mbox_msg, MAX_LEN, "{class: %s, res: %s, val: %ld}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue