mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ARM: rockchip: rv1106: pm: fix error when WAKEUP_TO_SYSTEM_RESET
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com> Change-Id: I5136c90c75001d473543365f6aa31a532b84506f
This commit is contained in:
committed by
Tao Huang
parent
93574e5e31
commit
d0632dae5c
@@ -1036,7 +1036,18 @@ static int rockchip_lpmode_enter(unsigned long arg)
|
||||
|
||||
cpu_do_idle();
|
||||
|
||||
pr_err("%s: Failed to suspend\n", __func__);
|
||||
#if RV1106_WAKEUP_TO_SYSTEM_RESET
|
||||
/* If reaches here, it means wakeup source cames before cpu enter wfi.
|
||||
* So we should do system reset if RV1106_WAKEUP_TO_SYSTEM_RESET.
|
||||
*/
|
||||
writel_relaxed(0x000c000c, cru_base + RV1106_CRU_GLB_RST_CON);
|
||||
writel_relaxed(0xffff0000, pmugrf_base + RV1106_PMUGRF_SOC_CON(4));
|
||||
writel_relaxed(0xffff0000, pmugrf_base + RV1106_PMUGRF_SOC_CON(5));
|
||||
dsb(sy);
|
||||
writel_relaxed(0xfdb9, cru_base + RV1106_CRU_GLB_SRST_FST);
|
||||
#endif
|
||||
|
||||
rkpm_printstr("Failed to suspend\n");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
#define RV1106_CRU_MODE_CON00 0x280
|
||||
#define RV1106_CRU_GATE_CON(i) (0x800 + (i) * 4)
|
||||
#define RV1106_CRU_GATE_CON_NUM 4
|
||||
#define RV1106_CRU_GLB_SRST_FST 0xc08
|
||||
#define RV1106_CRU_GLB_RST_CON 0xc10
|
||||
|
||||
#define CRU_PLLCON1_PWRDOWN BIT(13)
|
||||
#define CRU_PLLCON1_LOCK_STATUS BIT(10)
|
||||
|
||||
Reference in New Issue
Block a user