The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x ddab91f4b2de5c5b46e312a90107d9353087d8ea # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024071501-tasty-grandpa-318b@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
ddab91f4b2de ("pmdomain: qcom: rpmhpd: Skip retention level for Power Domains") e2ad626f8f40 ("pmdomain: Rename the genpd subsystem to pmdomain") b683a3620748 ("genpd: imx: relocate scu-pd under genpd") fe38a2d570df ("MAINTAINERS: adjust file entry in STARFIVE JH71XX PMU CONTROLLER DRIVER") 7ed363cd8d0a ("genpd: move owl-sps-helper.c from drivers/soc") b43f11e5b453 ("ARM: ux500: Move power-domain driver to the genpd dir") 444ffc820d90 ("soc: xilinx: Move power-domain driver to the genpd dir") 2449efaaf913 ("soc: ti: Mover power-domain drivers to the genpd dir") 27e0fef61ffd ("soc: tegra: Move powergate-bpmp driver to the genpd dir") fd697e216040 ("soc: sunxi: Move power-domain driver to the genpd dir") f3fb16291f48 ("soc: starfive: Move the power-domain driver to the genpd dir") 4419644bfc7f ("soc: samsung: Move power-domain driver to the genpd dir") a8fcd3da73de ("soc: rockchip: Mover power-domain driver to the genpd dir") 86341a84495c ("soc: renesas: Move power-domain drivers to the genpd dir") 84e9c58c2166 ("soc: qcom: Move power-domain drivers to the genpd dir") fcd9632122d7 ("soc: mediatek: Move power-domain drivers to the genpd dir") e5300b2c3fe0 ("soc: imx: Move power-domain drivers to the genpd dir") aded002384c1 ("soc: bcm: Move power-domain drivers to the genpd dir") 869b9dd3339a ("soc: apple: Move power-domain driver to the genpd dir") 22f86fab644b ("soc: amlogic: Move power-domain drivers to the genpd dir")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ddab91f4b2de5c5b46e312a90107d9353087d8ea Mon Sep 17 00:00:00 2001 From: Taniya Das quic_tdas@quicinc.com Date: Tue, 25 Jun 2024 10:03:11 +0530 Subject: [PATCH] pmdomain: qcom: rpmhpd: Skip retention level for Power Domains
In the cases where the power domain connected to logics is allowed to transition from a level(L)-->power collapse(0)-->retention(1) or vice versa retention(1)-->power collapse(0)-->level(L) will cause the logic to lose the configurations. The ARC does not support retention to collapse transition on MxC rails.
The targets from SM8450 onwards the PLL logics of clock controllers are connected to MxC rails and the recommended configurations are carried out during the clock controller probes. The MxC transition as mentioned above should be skipped to ensure the PLL settings are intact across clock controller power on & off.
On older targets that do not split MX into MxA and MxC does not collapse the logic and it is parked always at RETENTION, thus this issue is never observed on those targets.
Cc: stable@vger.kernel.org # v5.17 Reviewed-by: Bjorn Andersson andersson@kernel.org Signed-off-by: Taniya Das quic_tdas@quicinc.com Link: https://lore.kernel.org/r/20240625-avoid_mxc_retention-v2-1-af9c2f549a5f@qui... Signed-off-by: Ulf Hansson ulf.hansson@linaro.org
diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c index de9121ef4216..d2cb4271a1ca 100644 --- a/drivers/pmdomain/qcom/rpmhpd.c +++ b/drivers/pmdomain/qcom/rpmhpd.c @@ -40,6 +40,7 @@ * @addr: Resource address as looped up using resource name from * cmd-db * @state_synced: Indicator that sync_state has been invoked for the rpmhpd resource + * @skip_retention_level: Indicate that retention level should not be used for the power domain */ struct rpmhpd { struct device *dev; @@ -56,6 +57,7 @@ struct rpmhpd { const char *res_name; u32 addr; bool state_synced; + bool skip_retention_level; };
struct rpmhpd_desc { @@ -173,6 +175,7 @@ static struct rpmhpd mxc = { .pd = { .name = "mxc", }, .peer = &mxc_ao, .res_name = "mxc.lvl", + .skip_retention_level = true, };
static struct rpmhpd mxc_ao = { @@ -180,6 +183,7 @@ static struct rpmhpd mxc_ao = { .active_only = true, .peer = &mxc, .res_name = "mxc.lvl", + .skip_retention_level = true, };
static struct rpmhpd nsp = { @@ -819,6 +823,9 @@ static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd) return -EINVAL;
for (i = 0; i < rpmhpd->level_count; i++) { + if (rpmhpd->skip_retention_level && buf[i] == RPMH_REGULATOR_LEVEL_RETENTION) + continue; + rpmhpd->level[i] = buf[i];
/* Remember the first corner with non-zero level */
linux-stable-mirror@lists.linaro.org