]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: samsung: gs101: make all ufs related clocks critical
authorPeter Griffin <peter.griffin@linaro.org>
Fri, 18 Oct 2024 13:02:15 +0000 (14:02 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 21 Oct 2024 09:48:01 +0000 (11:48 +0200)
commit6aff357efc2bb060e5b400774becfd3d37644b44
tree9e7e305272b986336aebf424080933f89ecb961c
parent5e830d3c97d50d619ea8eec04403e87ff7538c76
clk: samsung: gs101: make all ufs related clocks critical

Enabling UFSHCD_CAP_HIBERN8_WITH_CLK_GATING in the UFS driver means
all UFS clocks are gated/ungated, which leads to the UFS IP getting
into a bad state and being completely non functional.

Downstream these clocks are all left in Automatic Clock Gate (ACG)
mode, and are not exposed to the UFS driver in DT. Enabling ACG is
ultimately what we need to do in the upstream Samsung clock driver
as well.

However until ACG is enabled upstream, we mark these clocks as
critical to avoid them being disabled. This then allow us to enable
UFSHCD_CAP_HIBERN8_WITH_CLK_GATING and have UFS hibern8.

Whilst this may seem at first glance a strange thing to do, the clocks
between UFS host and UFS device are still gated after this change, and
enabling UFS hibern8 leads to substantially cooler device when running
the upstream kernel on a Pixel 6 phone. This change only effects the
clocks from the CMU to the UFS IP.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20241018130215.487425-1-peter.griffin@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/clk/samsung/clk-gs101.c