From 6d39fb3bdc25951bc0bf6bb029f19fa21b7d1374 Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Fri, 20 Aug 2021 17:37:25 +0530 Subject: [PATCH] clk: smd: rpm: Add a qup active only vote for HOLI The pm8008 regulator is connected over I2C and the I2C device configures its BW vote in runtime_resume and runtime_suspend. These callbacks are triggered from the pm8008 driver's regmap calls. This means regulator framework requests for pm8008 call into the ICC framework which in turn calls into clock framework. The qcom rpm smd clock providers calls into RPM message with the the regulator framework, ICC framework and clock framework locks held. To prevent these deadlocks, enable the I2C qup clocks required for pm8008 by default during probe and stop requesting for clock enable/rate from the framework. Change-Id: Ifd486bec85a46139ccb15f4b5dbd2d43c33f3fda Signed-off-by: Taniya Das --- drivers/clk/qcom/clk-smd-rpm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index 49429c5fadda..3e96ceb0826a 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -1134,6 +1134,10 @@ static int rpm_smd_clk_probe(struct platform_device *pdev) /* Hold an active set vote for the snoc_keepalive_a_clk */ clk_prepare_enable(holi_snoc_a_clk.hw.clk); clk_set_rate(holi_snoc_a_clk.hw.clk, 19200000); + + /* Hold an active set vote for qup clock */ + clk_prepare_enable(holi_qup_a_clk.hw.clk); + clk_set_rate(holi_qup_a_clk.hw.clk, 19200000); } if (is_sdxnightjar) {