From b640fd39062194819cfb0ed4ff40b75fc383cac6 Mon Sep 17 00:00:00 2001 From: WANG Siyuan Date: Wed, 22 Oct 2014 13:47:18 +0800 Subject: [PATCH] AMD Hudson: enable IMC fan control using ACPI code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IMC fan control should be enabled after OS launched. I have tested on OliveHill and Parmer with Windows 7 and Ubuntu 13.10. Change-Id: I16d6ff6b1272d16b840e803e0a95f6e363c79704 Signed-off-by: WANG Siyuan Signed-off-by: WANG Siyuan Reviewed-on: http://review.coreboot.org/7165 Tested-by: build bot (Jenkins) Reviewed-by: Bruce Griffith Reviewed-by: Kyösti Mälkki --- src/southbridge/amd/agesa/hudson/Kconfig | 4 ++++ src/southbridge/amd/agesa/hudson/acpi/fch.asl | 9 ++++++--- src/southbridge/amd/agesa/hudson/hudson.c | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/southbridge/amd/agesa/hudson/Kconfig b/src/southbridge/amd/agesa/hudson/Kconfig index 9ff6ef1622..a2a43a428e 100644 --- a/src/southbridge/amd/agesa/hudson/Kconfig +++ b/src/southbridge/amd/agesa/hudson/Kconfig @@ -244,6 +244,10 @@ config HUDSON_LEGACY_FREE Select y if there is no keyboard controller in the system. This sets variables in AGESA and ACPI. +config ACPI_ENABLE_THERMAL_ZONE + bool + default y + endif # SOUTHBRIDGE_AMD_AGESA_HUDSON || SOUTHBRIDGE_AMD_AGESA_YANGTZE || SOUTHBRIDGE_AMD_AGESA_AVALON if SOUTHBRIDGE_AMD_AGESA_YANGTZE || SOUTHBRIDGE_AMD_AGESA_AVALON diff --git a/src/southbridge/amd/agesa/hudson/acpi/fch.asl b/src/southbridge/amd/agesa/hudson/acpi/fch.asl index 4ffd19fd7d..2d81d568cf 100644 --- a/src/southbridge/amd/agesa/hudson/acpi/fch.asl +++ b/src/southbridge/amd/agesa/hudson/acpi/fch.asl @@ -179,9 +179,12 @@ Method(_INI, 0) { /* Determine the OS we're running on */ OSFL() - /* TODO: It is unstable. */ - //#include "acpi/AmdImc.asl" /* Hudson IMC function */ - //ITZE() /* enable IMC Fan Control*/ +#ifdef CONFIG_HUDSON_IMC_FWM +#if CONFIG_HUDSON_IMC_FWM + #include "acpi/AmdImc.asl" /* Hudson IMC function */ + ITZE() /* enable IMC Fan Control*/ +#endif +#endif } /* End Method(_SB._INI) */ Method(OSFL, 0){ diff --git a/src/southbridge/amd/agesa/hudson/hudson.c b/src/southbridge/amd/agesa/hudson/hudson.c index f60dddb71f..3b57221d65 100644 --- a/src/southbridge/amd/agesa/hudson/hudson.c +++ b/src/southbridge/amd/agesa/hudson/hudson.c @@ -164,10 +164,12 @@ static void hudson_init(void *chip_info) static void hudson_final(void *chip_info) { +#if !CONFIG_ACPI_ENABLE_THERMAL_ZONE #if IS_ENABLED(CONFIG_HUDSON_IMC_FWM) /* AMD AGESA does not enable thermal zone, so we enable it here. */ enable_imc_thermal_zone(); #endif +#endif } struct chip_operations southbridge_amd_agesa_hudson_ops = {