linux/arch/loongarch/power
Jiaxun Yang e523a5a65f LoongArch: Add ACPI standard hardware register based S3 support
Most LoongArch 64 machines are using custom "SADR" ACPI extension to
perform ACPI S3 sleep. However the standard ACPI way to perform sleep
is to write a value to ACPI PM1/SLEEP_CTL register, and this is never
supported properly in kernel.

Add standard S3 sleep by providing a default DoSuspend function which
calls ACPI's acpi_enter_sleep_state() routine when SADR is not provided
by the firmware.

Also fix suspend assembly code so that ra is set properly before go
into sleep routine. (Previously linked address of jirl was set to a0,
some firmware do require return address in a0 but it's already set with
la.pcrel before).

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-07-20 22:41:06 +08:00
..
hibernate_asm.S
hibernate.c
Makefile
platform.c LoongArch: Add ACPI standard hardware register based S3 support 2024-07-20 22:41:06 +08:00
suspend_asm.S LoongArch: Add ACPI standard hardware register based S3 support 2024-07-20 22:41:06 +08:00
suspend.c LoongArch: Give a chance to build with !CONFIG_SMP 2024-05-14 12:24:18 +08:00