mb/google/nissa/var/rull: Configure Acoustic noise mitigation
[coreboot2.git] / src / soc / amd / common / block / pm / chipset_state.c
blob5dd6bd0ab70b266709e8e9d609584ca4fd10e1cd
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/acpi.h>
4 #include <amdblocks/gpio.h>
5 #include <amdblocks/pmlib.h>
6 #include <cbmem.h>
7 #include <elog.h>
8 #include <string.h>
10 static struct chipset_power_state chipset_state;
12 void fill_chipset_state(void)
14 acpi_fill_pm_gpe_state(&chipset_state.gpe_state);
15 gpio_fill_wake_state(&chipset_state.gpio_state);
18 void elog_gsmi_cb_platform_log_wake_source(void)
20 fill_chipset_state();
21 acpi_log_events(&chipset_state);
24 static void add_chipset_state_cbmem(int unused)
26 struct chipset_power_state *state;
28 state = cbmem_add(CBMEM_ID_POWER_STATE, sizeof(*state));
30 if (state)
31 memcpy(state, &chipset_state, sizeof(*state));
34 CBMEM_CREATION_HOOK(add_chipset_state_cbmem);