…Y exit
On Glymur the USB PHY GDSC needs to stay powered on while the PHY is
runtime suspended, so that host-mode bus suspend can resume without
losing PHY state. Losing that state causes memory loss and SMMU faults,
which show up as an xHCI crash on resume.
The GDSC side of this is handled by the gdsc_synced_poweroff_disable
callback, which only powers a GDSC off when GenPD's synced_poweroff flag
is set. Add the consumer half here: once the common PHY block is fully
exited and the PHY no longer needs its state preserved, call
dev_pm_genpd_synced_poweroff() so the GDSC is allowed to power off
instead of being retained indefinitely.
Gate this on a new use_synced_poweroff config flag and enable it only
for Glymur, leaving other platforms unchanged.
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
On Glymur the USB PHY GDSC needs to stay powered on while the PHY is runtime suspended, so that host-mode bus suspend can resume without losing PHY state. Losing that state causes memory loss and SMMU faults, which show up as an xHCI crash on resume.
The GDSC side of this is handled by the
gdsc_synced_poweroff_disablecallback, which only powers a GDSC off when GenPD'ssynced_poweroffflag is set. This change adds the consumer half: once the common PHY block is fully exited and the PHY no longer needs its state preserved,qmp_combo_com_exit()callsdev_pm_genpd_synced_poweroff()so the GDSC is allowed to power off instead of being retained indefinitely.Gated on a new
use_synced_poweroffconfig flag, enabled only for Glymur, so other platforms are unchanged.Companion change
This is the PHY/consumer half only. The matching clk-side change, which sets
.power_off = gdsc_synced_poweroff_disableon the Glymur USB PHY GDSCs, cannot live on this branch —tech/bus/usb/phylacks both prerequisites:tech/bus/usb/phy?0661ee1d650fclk: qcom: gdsc: Add custom disable callback for GX GDSCgdsc_gx_disable()a6d6436f89ccWORKAROUND: clk: qcom: gdsc: Conditionally disable GDSC if synced_poweroff flag is set#define gdsc_synced_poweroff_disableBuilding the clk change here fails with:
so it is being sent separately against
tech/bsp/clk, which already carries that infrastructure (as merged via #1421). This patch is a functional no-op until that lands, and is safe to merge on its own.