Skip to content

Commit 52dd070

Browse files
MrVanstorulf
authored andcommitted
pmdomain: imx: wait SSAR when i.MX93 power domain on
With "quiet" set in bootargs, there is power domain failure: "imx93_power_domain 44462400.power-domain: pd_off timeout: name: 44462400.power-domain, stat: 4" The current power on opertation takes ISO state as power on finished flag, but it is wrong. Before powering on operation really finishes, powering off comes and powering off will never finish because the last powering on still not finishes, so the following powering off actually not trigger hardware state machine to run. SSAR is the last step when powering on a domain, so need to wait SSAR done when powering on. Since EdgeLock Enclave(ELE) handshake is involved in the flow, enlarge the waiting time to 10ms for both on and off to avoid timeout. Cc: [email protected] Fixes: 0a0f7cc ("soc: imx: add i.MX93 SRC power domain driver") Reviewed-by: Jacky Bai <[email protected]> Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 50359c9 commit 52dd070

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/pmdomain/imx/imx93-pd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define FUNC_STAT_PSW_STAT_MASK BIT(0)
2121
#define FUNC_STAT_RST_STAT_MASK BIT(2)
2222
#define FUNC_STAT_ISO_STAT_MASK BIT(4)
23+
#define FUNC_STAT_SSAR_STAT_MASK BIT(8)
2324

2425
struct imx93_power_domain {
2526
struct generic_pm_domain genpd;
@@ -50,7 +51,7 @@ static int imx93_pd_on(struct generic_pm_domain *genpd)
5051
writel(val, addr + MIX_SLICE_SW_CTRL_OFF);
5152

5253
ret = readl_poll_timeout(addr + MIX_FUNC_STAT_OFF, val,
53-
!(val & FUNC_STAT_ISO_STAT_MASK), 1, 10000);
54+
!(val & FUNC_STAT_SSAR_STAT_MASK), 1, 10000);
5455
if (ret) {
5556
dev_err(domain->dev, "pd_on timeout: name: %s, stat: %x\n", genpd->name, val);
5657
return ret;
@@ -72,7 +73,7 @@ static int imx93_pd_off(struct generic_pm_domain *genpd)
7273
writel(val, addr + MIX_SLICE_SW_CTRL_OFF);
7374

7475
ret = readl_poll_timeout(addr + MIX_FUNC_STAT_OFF, val,
75-
val & FUNC_STAT_PSW_STAT_MASK, 1, 1000);
76+
val & FUNC_STAT_PSW_STAT_MASK, 1, 10000);
7677
if (ret) {
7778
dev_err(domain->dev, "pd_off timeout: name: %s, stat: %x\n", genpd->name, val);
7879
return ret;

0 commit comments

Comments
 (0)