[coreboot-gerrit] New patch to review for coreboot: 2e868e6 AMD Trinity and Kabini: fix fan control

WANG Siyuan (wangsiyuanbuaa@gmail.com) gerrit at coreboot.org
Fri Sep 26 08:43:45 CEST 2014


WANG Siyuan (wangsiyuanbuaa at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6981

-gerrit

commit 2e868e6443d3a78ba5f5c06eb46111f22cc9e44a
Author: WANG Siyuan <wangsiyuanbuaa at gmail.com>
Date:   Fri Sep 26 14:34:59 2014 +0800

    AMD Trinity and Kabini: fix fan control
    
    enable_imc_thermal_zone doesn't work in agesawrapper_post_device. The
    fan can stop but can't run again. Move enable_imc_thermal_zone to
    write_acpi_tables can resolve this problem.
    
    Change-Id: I1b5bf3f6f7a66c60743f78918dc5442cdfc8b6e4
    Signed-off-by: WANG Siyuan <SiYuan.Wang at amd.com>
    Signed-off-by: WANG Siyuan <wangsiyuanbuaa at gmail.com>
---
 src/cpu/amd/agesa/amd_late_init.c         |  8 --------
 src/mainboard/amd/olivehill/acpi_tables.c | 10 +++++++++-
 src/mainboard/amd/parmer/acpi_tables.c    |  9 +++++++++
 src/mainboard/amd/thatcher/acpi_tables.c  |  9 +++++++++
 4 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/cpu/amd/agesa/amd_late_init.c b/src/cpu/amd/agesa/amd_late_init.c
index c7927dc..cab03a3 100644
--- a/src/cpu/amd/agesa/amd_late_init.c
+++ b/src/cpu/amd/agesa/amd_late_init.c
@@ -27,9 +27,6 @@
 #include <agesawrapper.h>
 #include <northbridge/amd/agesa/agesawrapper_call.h>
 
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
-#include <southbridge/amd/agesa/hudson/imc.h>
-#endif
 #if CONFIG_AMD_SB_CIMX
 #include <sb_cimx.h>
 #endif
@@ -58,11 +55,6 @@ static void agesawrapper_post_device(void *unused)
 	pci_write_config32(dev, 0x60, value);
 #endif
 
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
-	/* AMD AGESA does not enable thermal zone, so we enable it here. */
-	enable_imc_thermal_zone();
-#endif
-
 #if CONFIG_AMD_SB_CIMX
 	sb_Late_Post();
 #endif
diff --git a/src/mainboard/amd/olivehill/acpi_tables.c b/src/mainboard/amd/olivehill/acpi_tables.c
index a02b92c..b819970 100644
--- a/src/mainboard/amd/olivehill/acpi_tables.c
+++ b/src/mainboard/amd/olivehill/acpi_tables.c
@@ -27,8 +27,10 @@
 #include <cpu/x86/msr.h>
 #include <cpu/amd/mtrr.h>
 #include <cpu/amd/amdfam16.h>
-
 #include "agesawrapper.h"
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+#include <southbridge/amd/agesa/hudson/imc.h>
+#endif
 
 extern const unsigned char AmlCode[];
 
@@ -282,5 +284,11 @@ unsigned long write_acpi_tables(unsigned long start)
 	acpi_add_table(rsdp, ssdt);
 
 	printk(BIOS_INFO, "ACPI: done.\n");
+
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+	/* AMD AGESA does not enable thermal zone, so we enable it here. */
+	enable_imc_thermal_zone();
+#endif
+
 	return current;
 }
diff --git a/src/mainboard/amd/parmer/acpi_tables.c b/src/mainboard/amd/parmer/acpi_tables.c
index e24ecc8..4f86205 100644
--- a/src/mainboard/amd/parmer/acpi_tables.c
+++ b/src/mainboard/amd/parmer/acpi_tables.c
@@ -29,6 +29,9 @@
 #include <cpu/x86/msr.h>
 #include <cpu/amd/mtrr.h>
 #include <cpu/amd/amdfam15.h>
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+#include <southbridge/amd/agesa/hudson/imc.h>
+#endif
 
 extern const unsigned char AmlCode[];
 
@@ -278,5 +281,11 @@ unsigned long write_acpi_tables(unsigned long start)
 	acpi_add_table(rsdp, ssdt);
 
 	printk(BIOS_INFO, "ACPI: done.\n");
+
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+	/* AMD AGESA does not enable thermal zone, so we enable it here. */
+	enable_imc_thermal_zone();
+#endif
+
 	return current;
 }
diff --git a/src/mainboard/amd/thatcher/acpi_tables.c b/src/mainboard/amd/thatcher/acpi_tables.c
index e24ecc8..4f86205 100644
--- a/src/mainboard/amd/thatcher/acpi_tables.c
+++ b/src/mainboard/amd/thatcher/acpi_tables.c
@@ -29,6 +29,9 @@
 #include <cpu/x86/msr.h>
 #include <cpu/amd/mtrr.h>
 #include <cpu/amd/amdfam15.h>
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+#include <southbridge/amd/agesa/hudson/imc.h>
+#endif
 
 extern const unsigned char AmlCode[];
 
@@ -278,5 +281,11 @@ unsigned long write_acpi_tables(unsigned long start)
 	acpi_add_table(rsdp, ssdt);
 
 	printk(BIOS_INFO, "ACPI: done.\n");
+
+#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
+	/* AMD AGESA does not enable thermal zone, so we enable it here. */
+	enable_imc_thermal_zone();
+#endif
+
 	return current;
 }



More information about the coreboot-gerrit mailing list