summaryrefslogtreecommitdiff
path: root/src/southbridge/amd
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-08-24 21:20:10 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-08-25 04:21:33 +0000
commiteb064b3947faed91e008d730ce80025738f02e86 (patch)
tree2c6811b0eaa3942567b604a3f2955f943947fb46 /src/southbridge/amd
parent20a5a8964f073783383f9f3b848a8caef521c736 (diff)
downloadcoreboot-eb064b3947faed91e008d730ce80025738f02e86.tar.xz
amd/XX/hudson: Remove #if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
Remove the unnecessary #if from around the #include "fchec.h". Turn #if statements into if(). Change-Id: Ia0582b3ce24c55dd439dfadb727507240accd9d5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21188 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/southbridge/amd')
-rw-r--r--src/southbridge/amd/agesa/hudson/hudson.c8
-rw-r--r--src/southbridge/amd/pi/hudson/hudson.c14
2 files changed, 8 insertions, 14 deletions
diff --git a/src/southbridge/amd/agesa/hudson/hudson.c b/src/southbridge/amd/agesa/hudson/hudson.c
index 101f5d42a2..9a6df61dba 100644
--- a/src/southbridge/amd/agesa/hudson/hudson.c
+++ b/src/southbridge/amd/agesa/hudson/hudson.c
@@ -181,12 +181,10 @@ static void hudson_init(void *chip_info)
static void hudson_final(void *chip_info)
{
-#if !IS_ENABLED(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
+ if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM) &&
+ !IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE))
+ enable_imc_thermal_zone();
}
struct chip_operations southbridge_amd_agesa_hudson_ops = {
diff --git a/src/southbridge/amd/pi/hudson/hudson.c b/src/southbridge/amd/pi/hudson/hudson.c
index 40b8b532ea..e306836736 100644
--- a/src/southbridge/amd/pi/hudson/hudson.c
+++ b/src/southbridge/amd/pi/hudson/hudson.c
@@ -26,10 +26,7 @@
#include "hudson.h"
#include "smbus.h"
#include "smi.h"
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
#include "fchec.h"
-#endif
-
int acpi_get_sleep_type(void)
{
@@ -123,12 +120,11 @@ static void hudson_init(void *chip_info)
static void hudson_final(void *chip_info)
{
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
- agesawrapper_fchecfancontrolservice();
-#if !IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE)
- enable_imc_thermal_zone();
-#endif
-#endif
+ if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
+ agesawrapper_fchecfancontrolservice();
+ if (!IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE))
+ enable_imc_thermal_zone();
+ }
}
struct chip_operations southbridge_amd_pi_hudson_ops = {