summaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx/clk-imx8qxp-lpcg.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2020-10-16 19:01:37 -0700
committerStephen Boyd <sboyd@kernel.org>2020-10-20 09:28:55 -0700
commitfda48bf5c86d88fd7074e318f290ad636dff4eaa (patch)
tree2bc5d0abb1ab5dd0e2c4b6bd74d2b55a57d8c665 /drivers/clk/imx/clk-imx8qxp-lpcg.c
parent80a18f4a8567b73b95c03d96f4f566cbd54bc36b (diff)
downloadlinux-fda48bf5c86d88fd7074e318f290ad636dff4eaa.tar.gz
linux-fda48bf5c86d88fd7074e318f290ad636dff4eaa.tar.bz2
linux-fda48bf5c86d88fd7074e318f290ad636dff4eaa.zip
clk: qcom: gdsc: Keep RETAIN_FF bit set if gdsc is already on
If the GDSC is enabled out of boot but doesn't have the retain ff bit set we will get confusing results where the registers that are powered by the GDSC lose their contents on the first power off of the GDSC but thereafter they retain their contents. This is because gdsc_init() fails to make sure the RETAIN_FF bit is set when it probes the GDSC the first time and thus powering off the GDSC causes the register contents to be reset. We do set the RETAIN_FF bit the next time we power on the GDSC, see gdsc_enable(), so that subsequent GDSC power off's don't lose register contents state. Forcibly set the bit at device probe time so that the kernel's assumed view of the GDSC is consistent with the state of the hardware. This fixes a problem where the audio PLL doesn't work on sc7180 when the bootloader leaves the lpass_core_hm GDSC enabled at boot (e.g. to make a noise) but critically doesn't set the RETAIN_FF bit. Cc: Douglas Anderson <dianders@chromium.org> Cc: Taniya Das <tdas@codeaurora.org> Cc: Rajendra Nayak <rnayak@codeaurora.org> Fixes: 173722995cdb ("clk: qcom: gdsc: Add support to enable retention of GSDCR") Signed-off-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20201017020137.1251319-1-sboyd@kernel.org Reviewed-by: Taniya Das <tdas@codeaurora.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Tested-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'drivers/clk/imx/clk-imx8qxp-lpcg.c')
0 files changed, 0 insertions, 0 deletions