soc/intel/*: Allow configuring 8254 timer via CMOS
Currently, the `USE_LEGACY_8254_TIMER` Kconfig option is the only way to enable or disable the legacy 8254 timer. Add the `legacy_8254_timer` CMOS option to allow enabling and disabling the 8254 timer without having to rebuild and reflash coreboot. If options are not enabled or the option is missing in cmos.layout, the Kconfig setting is used. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ic82c7f25cdf6587de5c40f59441579cfc92ff2f1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56256 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
committed by
Paul Fagerburg
parent
c0308eb860
commit
bc35bed18e
@@ -8,6 +8,7 @@
|
||||
#include <fsp/api.h>
|
||||
#include <fsp/ppi/mp_service_ppi.h>
|
||||
#include <fsp/util.h>
|
||||
#include <option.h>
|
||||
#include <intelblocks/irq.h>
|
||||
#include <intelblocks/lpss.h>
|
||||
#include <intelblocks/xdci.h>
|
||||
@@ -21,6 +22,7 @@
|
||||
#include <soc/soc_chip.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
|
||||
/* THC assignment definition */
|
||||
#define THC_NONE 0
|
||||
@@ -533,8 +535,9 @@ static void fill_fsps_8254_params(FSP_S_CONFIG *s_cfg,
|
||||
const struct soc_intel_alderlake_config *config)
|
||||
{
|
||||
/* Legacy 8254 timer support */
|
||||
s_cfg->Enable8254ClockGating = !CONFIG(USE_LEGACY_8254_TIMER);
|
||||
s_cfg->Enable8254ClockGatingOnS3 = !CONFIG(USE_LEGACY_8254_TIMER);
|
||||
bool use_8254 = get_uint_option("legacy_8254_timer", CONFIG(USE_LEGACY_8254_TIMER));
|
||||
s_cfg->Enable8254ClockGating = !use_8254;
|
||||
s_cfg->Enable8254ClockGatingOnS3 = !use_8254;
|
||||
}
|
||||
|
||||
static void fill_fsps_storage_params(FSP_S_CONFIG *s_cfg,
|
||||
|
Reference in New Issue
Block a user