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 <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/23573
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Richard Spiegel 2018-02-02 10:42:22 -07:00 committed by Martin Roth
parent 3e9694ef48
commit e8d8b064e8
1 changed files with 4 additions and 2 deletions

View File

@ -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