Attention is currently required from: Patrick Rudolph. Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50707 )
Change subject: soc/intel: Use acpi_pm_state_for_elog() ......................................................................
soc/intel: Use acpi_pm_state_for_elog()
Change-Id: If40311419aea526ba625ee6b3ae8c2abb791648e Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/intel/alderlake/elog.c M src/soc/intel/cannonlake/elog.c M src/soc/intel/elkhartlake/elog.c M src/soc/intel/icelake/elog.c M src/soc/intel/jasperlake/elog.c M src/soc/intel/tigerlake/elog.c 6 files changed, 18 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/50707/1
diff --git a/src/soc/intel/alderlake/elog.c b/src/soc/intel/alderlake/elog.c index 8ec1107..aa235ec 100644 --- a/src/soc/intel/alderlake/elog.c +++ b/src/soc/intel/alderlake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <stdint.h> @@ -104,12 +105,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps); diff --git a/src/soc/intel/cannonlake/elog.c b/src/soc/intel/cannonlake/elog.c index 4c39988..734a6cd 100644 --- a/src/soc/intel/cannonlake/elog.c +++ b/src/soc/intel/cannonlake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <device/pci_ops.h> @@ -163,12 +164,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps); diff --git a/src/soc/intel/elkhartlake/elog.c b/src/soc/intel/elkhartlake/elog.c index 14e463c..683c03c 100644 --- a/src/soc/intel/elkhartlake/elog.c +++ b/src/soc/intel/elkhartlake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <elog.h> @@ -92,12 +93,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps); diff --git a/src/soc/intel/icelake/elog.c b/src/soc/intel/icelake/elog.c index 4967fde..ee8b328 100644 --- a/src/soc/intel/icelake/elog.c +++ b/src/soc/intel/icelake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <stdint.h> @@ -92,12 +93,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps); diff --git a/src/soc/intel/jasperlake/elog.c b/src/soc/intel/jasperlake/elog.c index ccf6fd0..8db7742 100644 --- a/src/soc/intel/jasperlake/elog.c +++ b/src/soc/intel/jasperlake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <device/pci_ops.h> @@ -172,12 +173,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps); diff --git a/src/soc/intel/tigerlake/elog.c b/src/soc/intel/tigerlake/elog.c index 878959a..b6021ea 100644 --- a/src/soc/intel/tigerlake/elog.c +++ b/src/soc/intel/tigerlake/elog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi_pm.h> #include <bootstate.h> #include <console/console.h> #include <device/pci_ops.h> @@ -210,12 +211,10 @@
static void pch_log_state(void *unused) { - struct chipset_power_state *ps = pmc_get_power_state(); + const struct chipset_power_state *ps;
- if (!ps) { - printk(BIOS_ERR, "chipset_power_state not found!\n"); + if (acpi_pm_state_for_elog(&ps) < 0) return; - }
/* Power and Reset */ pch_log_power_and_resets(ps);