1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpigen.h>
4 #include <southbridge/intel/i82801gx/i82801gx.h>
6 #define MWAIT_RES(state, sub_state) \
8 .space_id = ACPI_ADDRESS_SPACE_FIXED, \
9 .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL, \
10 .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT, \
11 .access_size = ACPI_ACCESS_SIZE_UNDEFINED, \
12 .addrl = (((state) << 4) | (sub_state)), \
16 static const acpi_cstate_t cst_entries
[] = {
21 .resource
= MWAIT_RES(0, 0),
27 .resource
= MWAIT_RES(1, 0),
33 .resource
= MWAIT_RES(2, 0),
37 int get_cst_entries(const acpi_cstate_t
**entries
)
39 *entries
= cst_entries
;
40 return ARRAY_SIZE(cst_entries
);