summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/clk-branch.c
diff options
context:
space:
mode:
authorAmit Nischal <anischal@codeaurora.org>2018-04-30 18:20:09 +0200
committerStephen Boyd <sboyd@kernel.org>2018-05-08 20:22:55 +0200
commit7d99ced8f4c65267836db69ec0790e878ef11b3b (patch)
tree0f26d28cfd08ff283e332c6696ed22bf7bf34aeb /drivers/clk/qcom/clk-branch.c
parentclk: qcom: Simplify gdsc status checking logic (diff)
downloadlinux-7d99ced8f4c65267836db69ec0790e878ef11b3b.tar.xz
linux-7d99ced8f4c65267836db69ec0790e878ef11b3b.zip
clk: qcom: Add support for BRANCH_HALT_SKIP flag for branch clocks
There could be few clocks where the clock status bit is not required to be polled as the clock on/off would be controlled by enabling/disabling external source. Add support for the same by introducing new flag named as 'BRANCH_HALT_SKIP'. Signed-off-by: Amit Nischal <anischal@codeaurora.org> [sboyd@kernel.org: Rename flag to BRANCH_HALT_SKIP] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/clk-branch.c')
-rw-r--r--drivers/clk/qcom/clk-branch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
index 26f7af315066..c58c5538b1b6 100644
--- a/drivers/clk/qcom/clk-branch.c
+++ b/drivers/clk/qcom/clk-branch.c
@@ -77,8 +77,11 @@ static int clk_branch_wait(const struct clk_branch *br, bool enabling,
bool voted = br->halt_check & BRANCH_VOTED;
const char *name = clk_hw_get_name(&br->clkr.hw);
- /* Skip checking halt bit if the clock is in hardware gated mode */
- if (clk_branch_in_hwcg_mode(br))
+ /*
+ * Skip checking halt bit if we're explicitly ignoring the bit or the
+ * clock is in hardware gated mode
+ */
+ if (br->halt_check == BRANCH_HALT_SKIP || clk_branch_in_hwcg_mode(br))
return 0;
if (br->halt_check == BRANCH_HALT_DELAY || (!enabling && voted)) {