diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-04-13 16:04:48 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-05-01 06:38:45 +0000 |
commit | b1c1996b1c89f621103a1d2e0c9db103ea19f0f7 (patch) | |
tree | 12c1542fd5cc722ce55bd94d3acb4c22a361e852 /src/mainboard | |
parent | 0eb5974def63a2fc0dce6dfdad62b0b4c6f4b865 (diff) |
mb/prodrive/atlas: Enable/disable sleep states based on EC
With the profile ATLAS_PROF_REALTIME_PERFORMANCE it is desired to not
have the option to be able to enter sleep. The reason is that Microsoft
Windows goes to sleep after 30min of inactivity by default.
TEST: See that Microsoft Windows 11 has no 'Sleep' option in the start
menu.
Change-Id: I424db7e712a705c628aa3a10a486d3313404987a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74421
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/prodrive/atlas/mainboard.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainboard/prodrive/atlas/mainboard.c b/src/mainboard/prodrive/atlas/mainboard.c index db808ce45a..0128670d9c 100644 --- a/src/mainboard/prodrive/atlas/mainboard.c +++ b/src/mainboard/prodrive/atlas/mainboard.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <acpi/acpigen.h> #include <console/console.h> #include <device/device.h> #include <gpio.h> @@ -66,9 +67,19 @@ static void mainboard_smbios_strings(struct device *dev, struct smbios_type11 *t t->count = smbios_add_string(t->eos, get_formatted_pn()); } +static void mainboard_fill_ssdt(const struct device *dev) +{ + const struct emi_eeprom_vpd *eeprom = get_emi_eeprom_vpd(); + const bool sleep_enable = eeprom->profile != ATLAS_PROF_REALTIME_PERFORMANCE ? 1 : 0; + acpigen_ssdt_override_sleep_states(false, false, + CONFIG(HAVE_ACPI_RESUME) && sleep_enable, + sleep_enable); +} + static void mainboard_enable(struct device *dev) { dev->ops->get_smbios_strings = mainboard_smbios_strings; + dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt; } struct chip_operations mainboard_ops = { |