summary refs log tree commit diff stats
path: root/include/hw/acpi/generic_event_device.h
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2024-09-18 09:42:05 +0800
committerSong Gao <gaosong@loongson.cn>2024-10-16 15:56:42 +0800
commitedafc90ba481c586d0a649f34dcb8cd1f29c4259 (patch)
tree6e17abd047fc87b7ac54756eab4beb3736d8f222 /include/hw/acpi/generic_event_device.h
parentf774a677507966222624a9b2859f06ede7608100 (diff)
downloadfocaccia-qemu-edafc90ba481c586d0a649f34dcb8cd1f29c4259.tar.gz
focaccia-qemu-edafc90ba481c586d0a649f34dcb8cd1f29c4259.zip
acpi: ged: Add macro for acpi sleep control register
Macro definition is added for acpi sleep control register, ged emulation
driver can use the macro , also it can be used in FDT table if ged is
exposed with FDT table.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240918014206.2165821-2-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'include/hw/acpi/generic_event_device.h')
-rw-r--r--include/hw/acpi/generic_event_device.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/generic_event_device.h
index 40af3550b5..d2dac87b4a 100644
--- a/include/hw/acpi/generic_event_device.h
+++ b/include/hw/acpi/generic_event_device.h
@@ -81,8 +81,11 @@ OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED)
 /* ACPI_GED_REG_RESET value for reset*/
 #define ACPI_GED_RESET_VALUE       0x42
 
-/* ACPI_GED_REG_SLEEP_CTL.SLP_TYP value for S5 (aka poweroff) */
-#define ACPI_GED_SLP_TYP_S5        0x05
+/* [ACPI 5.0 Chapter 4.8.3.7] Sleep Control and Status Register */
+#define ACPI_GED_SLP_TYP_POS       0x2   /* SLP_TYPx Bit Offset */
+#define ACPI_GED_SLP_TYP_MASK      0x07  /* SLP_TYPx 3-bit mask */
+#define ACPI_GED_SLP_TYP_S5        0x05  /* System _S5 State (Soft Off) */
+#define ACPI_GED_SLP_EN            0x20  /* SLP_EN write-only bit */
 
 #define GED_DEVICE      "GED"
 #define AML_GED_EVT_REG "EREG"