summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/gardenia/BiosCallOuts.c
blob: e1e5437da775a17659c5b94018ff77831381d071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * This file is part of the coreboot project.
 *
 * Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <AGESA.h>
#include <BiosCallOuts.h>
#include <FchPlatform.h>
#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.
 */
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));
}

void platform_FchParams_env(FCH_DATA_BLOCK *FchParams_env)
{

}