clk: qcom: gdsc: Implement NO_RET_PERIPH flag
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Wed, 13 Jan 2021 18:38:15 +0000 (19:38 +0100)
committerStephen Boyd <sboyd@kernel.org>
Sun, 14 Feb 2021 20:56:54 +0000 (12:56 -0800)
commit785c02eb35009a4be6dbc68f4f7d916e90b7177d
tree412f80bb07a98cf6bbf967a5de6eca05213b1c63
parent68e1d106eb4dceb61bc2818d829786b364fd502b
clk: qcom: gdsc: Implement NO_RET_PERIPH flag

In some rare occasions, we want to only set the RETAIN_MEM bit, but
not the RETAIN_PERIPH one: this is seen on at least SDM630/636/660's
GPU-GX GDSC, where unsetting and setting back the RETAIN_PERIPH bit
will generate chaos and panics during GPU suspend time (mainly, the
chaos is unaligned access).

For this reason, introduce a new NO_RET_PERIPH flag to the GDSC
driver to address this corner case.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Link: https://lore.kernel.org/r/20210113183817.447866-8-angelogioacchino.delregno@somainline.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/gdsc.c
drivers/clk/qcom/gdsc.h