rockchip: Disable rdist before pwr_dm_suspend is called
authorDerek Basehore <dbasehore@chromium.org>
Fri, 26 Jan 2018 06:05:41 +0000 (22:05 -0800)
committerDerek Basehore <dbasehore@chromium.org>
Fri, 26 Jan 2018 06:09:23 +0000 (22:09 -0800)
This disables the redistributor before either of the pwr_dm_suspend
functions are called. This is because the rdist save code in the
rk3399 rockchip_soc_sys_pwr_dm_suspend function requires that each
redistributor be disabled before saving state.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
plat/rockchip/common/plat_pm.c

index cd88f60cbc5491a7d4f291b4526508d11a8e9dff..352dbc842f7ede6cda8ff64b58a19ba038310a7e 100644 (file)
@@ -246,14 +246,14 @@ void rockchip_pwr_domain_suspend(const psci_power_state_t *target_state)
        if (RK_CORE_PWR_STATE(target_state) != PLAT_MAX_OFF_STATE)
                return;
 
+       /* Prevent interrupts from spuriously waking up this cpu */
+       plat_rockchip_gic_cpuif_disable();
+
        if (RK_SYSTEM_PWR_STATE(target_state) == PLAT_MAX_OFF_STATE)
                rockchip_soc_sys_pwr_dm_suspend();
        else
                rockchip_soc_cores_pwr_dm_suspend();
 
-       /* Prevent interrupts from spuriously waking up this cpu */
-       plat_rockchip_gic_cpuif_disable();
-
        /* Perform the common cluster specific operations */
        if (RK_CLUSTER_PWR_STATE(target_state) == PLAT_MAX_OFF_STATE)
                plat_cci_disable();