AGESA mainboards: Clean up IS_ENABLED fan control
Remove all checks for #if IS_ENABLED(CONFIG_HUDSON_IMC_FWM) around the imc.h includes. Convert all #if to if() for fan control setup. Change-Id: I04a9fbbf6f64f45e1a0b544267bfe840ce7fa1d9 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/21059 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
committed by
Kyösti Mälkki
parent
0bf3f55b5c
commit
6dd620bf10
@@ -21,9 +21,7 @@
|
||||
#include "heapManager.h"
|
||||
#include "FchPlatform.h"
|
||||
#include "cbfs.h"
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
#include "imc.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
||||
@@ -107,8 +105,7 @@ static const CODEC_TBL_LIST OlivehillCodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -166,13 +163,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#include "heapManager.h"
|
||||
#include "FchPlatform.h"
|
||||
#include "cbfs.h"
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
#include "imc.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
||||
@@ -107,8 +105,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -166,13 +163,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#include "heapManager.h"
|
||||
#include "FchPlatform.h"
|
||||
#include "cbfs.h"
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
#include "imc.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
||||
@@ -107,8 +105,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -166,13 +163,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -164,7 +164,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
LibAmdMemCopy ((VOID *)(FchParams->Hwm.HwmFanControl), &oem_factl, (sizeof(FCH_HWM_FAN_CTR) * 5), FchParams->StdHeader);
|
||||
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if defined CONFIG_HUDSON_IMC_FWM && (CONFIG_HUDSON_IMC_FWM == 1)
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = FALSE;/* 0 disable, 1 enable TSI Auto Polling */
|
||||
@@ -278,13 +278,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#include "heapManager.h"
|
||||
#include "FchPlatform.h"
|
||||
#include "cbfs.h"
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
#include "imc.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <spd_bin.h>
|
||||
|
||||
@@ -110,8 +108,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -169,13 +166,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#include "heapManager.h"
|
||||
#include "FchPlatform.h"
|
||||
#include "cbfs.h"
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
#include "imc.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
||||
@@ -107,8 +105,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -166,13 +163,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
|
||||
|
@@ -103,8 +103,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -162,13 +161,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
|
||||
|
@@ -105,8 +105,7 @@ static const CODEC_TBL_LIST CodecTableList[] =
|
||||
static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
{
|
||||
/* Enable IMC fan control. the recommand way */
|
||||
#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
|
||||
|
||||
if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM)) {
|
||||
imc_reg_init();
|
||||
|
||||
/* HwMonitorEnable = TRUE && HwmFchtsiAutoOpll ==FALSE to call FchECfancontrolservice */
|
||||
@@ -164,13 +163,12 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams)
|
||||
* AGESA put EcDefaultMassege as global data in ROM, so we can't overwride it.
|
||||
* so we remove it from AGESA code. Please Seee FchInitLateHwm.
|
||||
*/
|
||||
|
||||
#else /* HWM fan control, the way not recommand */
|
||||
} else {
|
||||
/* HWM fan control, the way not recommand */
|
||||
FchParams->Imc.ImcEnable = FALSE;
|
||||
FchParams->Hwm.HwMonitorEnable = TRUE;
|
||||
FchParams->Hwm.HwmFchtsiAutoPoll = TRUE;/* 1 enable, 0 disable TSI Auto Polling */
|
||||
|
||||
#endif /* CONFIG_HUDSON_IMC_FWM */
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user