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>
This commit is contained in:
parent
0eb5974def
commit
b1c1996b1c
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <acpi/acpigen.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <gpio.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());
|
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)
|
static void mainboard_enable(struct device *dev)
|
||||||
{
|
{
|
||||||
dev->ops->get_smbios_strings = mainboard_smbios_strings;
|
dev->ops->get_smbios_strings = mainboard_smbios_strings;
|
||||||
|
dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct chip_operations mainboard_ops = {
|
struct chip_operations mainboard_ops = {
|
||||||
|
|
Loading…
Reference in New Issue