Skip to content

Commit 1c1378a

Browse files
committed
LoongArch: Enable PG when wakeup from suspend
Some firmwares don't enable PG when wakeup from suspend, so do it in kernel. This can improve code compatibility for boot kernel. Signed-off-by: Baoqi Zhang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 6637775 commit 1c1378a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/loongarch/power/suspend_asm.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ SYM_INNER_LABEL(loongarch_wakeup_start, SYM_L_GLOBAL)
8080

8181
JUMP_VIRT_ADDR t0, t1
8282

83+
/* Enable PG */
84+
li.w t0, 0xb0 # PLV=0, IE=0, PG=1
85+
csrwr t0, LOONGARCH_CSR_CRMD
86+
8387
la.pcrel t0, acpi_saved_sp
8488
ld.d sp, t0, 0
8589
SETUP_WAKEUP

0 commit comments

Comments
 (0)