Skip to content

Commit ddab91f

Browse files
Taniya Dasstorulf
authored andcommitted
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: [email protected] # v5.17 Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Taniya Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent c3f38fa commit ddab91f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/pmdomain/qcom/rpmhpd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @addr: Resource address as looped up using resource name from
4141
* cmd-db
4242
* @state_synced: Indicator that sync_state has been invoked for the rpmhpd resource
43+
* @skip_retention_level: Indicate that retention level should not be used for the power domain
4344
*/
4445
struct rpmhpd {
4546
struct device *dev;
@@ -56,6 +57,7 @@ struct rpmhpd {
5657
const char *res_name;
5758
u32 addr;
5859
bool state_synced;
60+
bool skip_retention_level;
5961
};
6062

6163
struct rpmhpd_desc {
@@ -173,13 +175,15 @@ static struct rpmhpd mxc = {
173175
.pd = { .name = "mxc", },
174176
.peer = &mxc_ao,
175177
.res_name = "mxc.lvl",
178+
.skip_retention_level = true,
176179
};
177180

178181
static struct rpmhpd mxc_ao = {
179182
.pd = { .name = "mxc_ao", },
180183
.active_only = true,
181184
.peer = &mxc,
182185
.res_name = "mxc.lvl",
186+
.skip_retention_level = true,
183187
};
184188

185189
static struct rpmhpd nsp = {
@@ -819,6 +823,9 @@ static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
819823
return -EINVAL;
820824

821825
for (i = 0; i < rpmhpd->level_count; i++) {
826+
if (rpmhpd->skip_retention_level && buf[i] == RPMH_REGULATOR_LEVEL_RETENTION)
827+
continue;
828+
822829
rpmhpd->level[i] = buf[i];
823830

824831
/* Remember the first corner with non-zero level */

0 commit comments

Comments
 (0)