OSDN Git Service

clk: qcom: gdsc: Add support to poll CFG register to check GDSC state
authorAmit Nischal <anischal@codeaurora.org>
Tue, 1 May 2018 05:03:33 +0000 (10:33 +0530)
committerStephen Boyd <sboyd@kernel.org>
Tue, 1 May 2018 23:34:07 +0000 (16:34 -0700)
commite892e17d0c0e3d1bb8a56b84d15f9995807b92fa
tree4fd6eacff0c5ec6ada7f83aad5430daf7cf01817
parent9fb38caee2541009c9e040d9a3962157c7bb4c5f
clk: qcom: gdsc: Add support to poll CFG register to check GDSC state

The default behavior of the GDSC enable/disable sequence is to
poll the status bits of either the actual GDSCR or the
corresponding HW_CTRL registers.

On targets which have support for a CFG_GDSCR register, the
status bits might not show the correct state of the GDSC,
especially in the disable sequence, where the status bit
will be cleared even before the core is completely power
collapsed. On targets with this issue, poll the power on/off
bits in the CFG_GDSCR register instead to correctly determine
the GDSC state.

Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/gdsc.c
drivers/clk/qcom/gdsc.h