Skip to content

Commit

Permalink
clk: qcom: gdsc: Increase status poll timeout
Browse files Browse the repository at this point in the history
The SM8550 GCC GDSCs need a higher timeout value when polling for status,
so increase it to 1500us, while leaving the delay between disable-enable
sequence for votable gdscs to stay the same.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221130112852.2977816-4-abel.vesa@linaro.org
  • Loading branch information
Abel Vesa authored and Bjorn Andersson committed Dec 1, 2022
1 parent 47ba9c5 commit 7364379
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/clk/qcom/gdsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#define RETAIN_MEM BIT(14)
#define RETAIN_PERIPH BIT(13)

#define STATUS_POLL_TIMEOUT_US 1500
#define TIMEOUT_US 500

#define domain_to_gdsc(domain) container_of(domain, struct gdsc, pd)
Expand Down Expand Up @@ -124,7 +125,7 @@ static int gdsc_poll_status(struct gdsc *sc, enum gdsc_status status)
do {
if (gdsc_check_status(sc, status))
return 0;
} while (ktime_us_delta(ktime_get(), start) < TIMEOUT_US);
} while (ktime_us_delta(ktime_get(), start) < STATUS_POLL_TIMEOUT_US);

if (gdsc_check_status(sc, status))
return 0;
Expand Down

0 comments on commit 7364379

Please sign in to comment.