From 13e151f31ce25dce4116214d7e3329506e029887 Mon Sep 17 00:00:00 2001 From: Eran Mitrani Date: Tue, 29 Nov 2022 12:54:53 -0800 Subject: [PATCH] soc/intel/alderlake: skip external buses for D-states list The devices in the list that was introduced in commit c66ea985776 ("soc/intel/alderlake: provide a list of D-states to enter LPM") are all internal. This CL skips the external buses (which caused the addition of packages to non-existant paths such as "_SB.PCI0.RP1.MCHC", and warnings from the kernel) BUG=b:231582182 TEST=Built and tested on anahera by verifying SSDT contents Change-Id: I3785b2b2af85d96e2e1296b6cfdefcd72080b5fe Signed-off-by: Eran Mitrani Reviewed-on: https://review.coreboot.org/c/coreboot/+/70163 Reviewed-by: Tarun Tuli Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Eric Lai --- src/soc/intel/alderlake/acpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index c874067701..d7405ccfde 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -251,6 +251,9 @@ static enum dev_sleep_states get_min_sleep_state(const struct device *dev) return DEFAULT_CPU_D_STATE; case DEVICE_PATH_PCI: + /* skip external buses*/ + if (dev->bus->secondary != 0) + return NONE; for (size_t i = 0; i < ARRAY_SIZE(min_pci_sleep_states); i++) if (min_pci_sleep_states[i].pci_dev == dev->path.pci.devfn) return min_pci_sleep_states[i].min_sleep_state;