From e8d8b064e833f12a5a65c57a750bd8356fbe08a9 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Fri, 2 Feb 2018 10:42:22 -0700 Subject: soc/amd/stoneyridge/acpi/sb_pci0_fch.asl: Fix instability A file that has several methods cannot be included inside a method. It has to be included inside a scope, but not inside a method or it'll cause problems (instability). There is an ugly construction in method _INI. It's needed because if AmdImc is not included then the call to ITZE would break the build. BUG=b:62200858 TEST=Build kahlee. Change-Id: If6c877df5a87df1b348de92868b91eed4a76de55 Signed-off-by: Richard Spiegel Reviewed-on: https://review.coreboot.org/23573 Tested-by: build bot (Jenkins) Reviewed-by: Justin TerAvest Reviewed-by: Martin Roth --- src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/soc') diff --git a/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl b/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl index 216b57c7ce..e767fddbc9 100644 --- a/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl +++ b/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl @@ -130,6 +130,10 @@ Method(_CRS, 0) { Return(CRES) /* note to change the Name buffer */ } /* end of Method(_SB.PCI0._CRS) */ +#if IS_ENABLED(CONFIG_STONEYRIDGE_IMC_FWM) + #include "acpi/AmdImc.asl" +#endif + /* * * FIRST METHOD CALLED UPON BOOT @@ -156,8 +160,6 @@ Method(_INI, 0) { OSFL() #if IS_ENABLED(CONFIG_STONEYRIDGE_IMC_FWM) - /* TODO: It is unstable. */ - #include "acpi/AmdImc.asl" #if IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE) ITZE() /* enable IMC Fan Control*/ #endif -- cgit v1.2.3