summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurora pro automerger <aurora-pro-automerger@google.com>2022-09-20 16:57:32 -0700
committerSermin Aydin <sermin@google.com>2022-09-30 19:07:56 +0000
commitb734962d272c08c48e376d1d0dbadc8cb279be36 (patch)
tree83ed8e48f3ef0d117c1217b54474378f7c10ecc6
parent2014182f4a8c0ba375f92e808a67222dbd7c2db0 (diff)
downloadgs201-b734962d272c08c48e376d1d0dbadc8cb279be36.tar.gz
gxp: Wait for PS0 before powering down BLK_AUR Bug: 247273478 GitOrigin-RevId: dcb6a78b915da268c6d89ce1b05d320940191150 Change-Id: I6d0e668de2e8ecbb82181e1fee2bb19e817345d6
-rw-r--r--gxp-pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gxp-pm.c b/gxp-pm.c
index ca8c795..5ed9612 100644
--- a/gxp-pm.c
+++ b/gxp-pm.c
@@ -77,6 +77,12 @@ static int gxp_pm_blkpwr_down(struct gxp_dev *gxp)
*/
lpm_write_32_psm(gxp, LPM_TOP_PSM, LPM_REG_ENABLE_STATE_1, 0x0);
lpm_write_32_psm(gxp, LPM_TOP_PSM, LPM_REG_ENABLE_STATE_2, 0x0);
+ if (!gxp_lpm_wait_state_eq(gxp, LPM_TOP_PSM, LPM_ACTIVE_STATE)) {
+ dev_err(gxp->dev,
+ "failed to force TOP LPM to PS0 during blk down\n");
+ return -EAGAIN;
+ }
+
ret = pm_runtime_put_sync(gxp->dev);
if (ret)
/*