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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:24 +0000 (17:06 +0100)
commit661cba45dc67729a0a0e891320f3e3b713638a5b
treec578c07b36f4202a42394ad36adcd5ab229ec60a
parenta19d18a1171b4449fba6e82e02052d661308276e
clk: qcom: gdsc: Implement NO_RET_PERIPH flag

[ Upstream commit 785c02eb35009a4be6dbc68f4f7d916e90b7177d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/gdsc.c
drivers/clk/qcom/gdsc.h