diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/amd/gardenia/BiosCallOuts.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c index 31681cbe27..1d06411790 100644 --- a/src/mainboard/amd/gardenia/BiosCallOuts.c +++ b/src/mainboard/amd/gardenia/BiosCallOuts.c @@ -19,6 +19,29 @@ #include <soc/imc.h> #include <soc/southbridge.h> #include <stdlib.h> +#include <string.h> + +/* Hardware Monitor Fan Control + * Hardware limitation: + * HWM will fail to read the input temperature via I2C if other + * software switches the I2C address. AMD recommends using IMC + * to control fans, instead of HWM. + */ +static void oem_fan_control(FCH_DATA_BLOCK *FchParams) +{ + /* Enable IMC fan control. the recommand way */ + imc_reg_init(); + + FchParams->Imc.ImcEnable = TRUE; + + /* 1 IMC, 0 HWM */ + FchParams->Hwm.HwmControl = 1; + + /* 2 disable IMC, 1 enable IMC, 0 following hw strap setting */ + FchParams->Imc.ImcEnableOverWrite = 1; + + memset(&FchParams->Imc.EcStruct, 0, sizeof(FCH_EC)); +} static AGESA_STATUS fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { |