Skip to content
Commit 72ceafb5 authored by Md Sadre Alam's avatar Md Sadre Alam Committed by Bjorn Andersson
Browse files

clk: qcom: gcc-ipq9574: Add BRANCH_HALT_VOTED flag

The crypto_ahb and crypto_axi clks are hardware voteable.
This means that the halt bit isn't reliable because some
other voter in the system, e.g. TrustZone, could be keeping
the clk enabled when the kernel turns it off from clk_disable().
Make these clks use voting mode by changing the halt check to
BRANCH_HALT_VOTED and toggle the voting bit in the voting register
instead of directly controlling the branch by writing to the branch
register. This fixes stuck clk warnings seen on ipq9574 and saves
power by actually turning the clk off.

Also changes the CRYPTO_AHB_CLK_ENA & CRYPTO_AXI_CLK_ENA
offset to 0xb004 from 0x16014.

Cc: stable@vger.kernel.org
Fixes: f6b2bd9c

 ("clk: qcom: gcc-ipq9574: Enable crypto clocks")
Signed-off-by: default avatarMd Sadre Alam <quic_mdalam@quicinc.com>
Link: https://lore.kernel.org/r/20240509105405.1262369-1-quic_mdalam@quicinc.com
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 2ba84256
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment